home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 24 / CU Amiga Magazine's Super CD-ROM 24 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-07].iso / CUCD / Programming / SWI / source / src / configure < prev    next >
Encoding:
Text File  |  1998-04-15  |  121.6 KB  |  4,550 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.12 
  5. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14. ac_help="$ac_help
  15.   --enable-syslibh      Prototype file to enable gcc -Wall"
  16. ac_help="$ac_help
  17.   --enable-runtime      Runtime system only"
  18. ac_help="$ac_help
  19.   --disable-shared      No shared-lib interface"
  20. ac_help="$ac_help
  21.   --enable-save          Provide save/1 and friends"
  22.  
  23. # Initialize some variables set by options.
  24. # The variables have the same names as the options, with
  25. # dashes changed to underlines.
  26. build=NONE
  27. cache_file=./config.cache
  28. exec_prefix=NONE
  29. host=NONE
  30. no_create=
  31. nonopt=NONE
  32. no_recursion=
  33. prefix=NONE
  34. program_prefix=NONE
  35. program_suffix=NONE
  36. program_transform_name=s,x,x,
  37. silent=
  38. site=
  39. srcdir=
  40. target=NONE
  41. verbose=
  42. x_includes=NONE
  43. x_libraries=NONE
  44. bindir='${exec_prefix}/bin'
  45. sbindir='${exec_prefix}/sbin'
  46. libexecdir='${exec_prefix}/libexec'
  47. datadir='${prefix}/share'
  48. sysconfdir='${prefix}/etc'
  49. sharedstatedir='${prefix}/com'
  50. localstatedir='${prefix}/var'
  51. libdir='${exec_prefix}/lib'
  52. includedir='${prefix}/include'
  53. oldincludedir='/usr/include'
  54. infodir='${prefix}/info'
  55. mandir='${prefix}/man'
  56.  
  57. # Initialize some other variables.
  58. subdirs=
  59. MFLAGS= MAKEFLAGS=
  60. # Maximum number of lines to put in a shell here document.
  61. ac_max_here_lines=12
  62.  
  63. ac_prev=
  64. for ac_option
  65. do
  66.  
  67.   # If the previous option needs an argument, assign it.
  68.   if test -n "$ac_prev"; then
  69.     eval "$ac_prev=\$ac_option"
  70.     ac_prev=
  71.     continue
  72.   fi
  73.  
  74.   case "$ac_option" in
  75.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  76.   *) ac_optarg= ;;
  77.   esac
  78.  
  79.   # Accept the important Cygnus configure options, so we can diagnose typos.
  80.  
  81.   case "$ac_option" in
  82.  
  83.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  84.     ac_prev=bindir ;;
  85.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  86.     bindir="$ac_optarg" ;;
  87.  
  88.   -build | --build | --buil | --bui | --bu)
  89.     ac_prev=build ;;
  90.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  91.     build="$ac_optarg" ;;
  92.  
  93.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  94.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  95.     ac_prev=cache_file ;;
  96.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  97.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  98.     cache_file="$ac_optarg" ;;
  99.  
  100.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  101.     ac_prev=datadir ;;
  102.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  103.   | --da=*)
  104.     datadir="$ac_optarg" ;;
  105.  
  106.   -disable-* | --disable-*)
  107.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  108.     # Reject names that are not valid shell variable names.
  109.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  110.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  111.     fi
  112.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  113.     eval "enable_${ac_feature}=no" ;;
  114.  
  115.   -enable-* | --enable-*)
  116.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  117.     # Reject names that are not valid shell variable names.
  118.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  119.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  120.     fi
  121.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  122.     case "$ac_option" in
  123.       *=*) ;;
  124.       *) ac_optarg=yes ;;
  125.     esac
  126.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  127.  
  128.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  129.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  130.   | --exec | --exe | --ex)
  131.     ac_prev=exec_prefix ;;
  132.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  133.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  134.   | --exec=* | --exe=* | --ex=*)
  135.     exec_prefix="$ac_optarg" ;;
  136.  
  137.   -gas | --gas | --ga | --g)
  138.     # Obsolete; use --with-gas.
  139.     with_gas=yes ;;
  140.  
  141.   -help | --help | --hel | --he)
  142.     # Omit some internal or obsolete options to make the list less imposing.
  143.     # This message is too long to be a string in the A/UX 3.1 sh.
  144.     cat << EOF
  145. Usage: configure [options] [host]
  146. Options: [defaults in brackets after descriptions]
  147. Configuration:
  148.   --cache-file=FILE       cache test results in FILE
  149.   --help                  print this message
  150.   --no-create             do not create output files
  151.   --quiet, --silent       do not print \`checking...' messages
  152.   --version               print the version of autoconf that created configure
  153. Directory and file names:
  154.   --prefix=PREFIX         install architecture-independent files in PREFIX
  155.                           [$ac_default_prefix]
  156.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  157.                           [same as prefix]
  158.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  159.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  160.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  161.   --datadir=DIR           read-only architecture-independent data in DIR
  162.                           [PREFIX/share]
  163.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  164.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  165.                           [PREFIX/com]
  166.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  167.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  168.   --includedir=DIR        C header files in DIR [PREFIX/include]
  169.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  170.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  171.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  172.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  173.   --program-prefix=PREFIX prepend PREFIX to installed program names
  174.   --program-suffix=SUFFIX append SUFFIX to installed program names
  175.   --program-transform-name=PROGRAM
  176.                           run sed PROGRAM on installed program names
  177. EOF
  178.     cat << EOF
  179. Host type:
  180.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  181.   --host=HOST             configure for HOST [guessed]
  182.   --target=TARGET         configure for TARGET [TARGET=HOST]
  183. Features and packages:
  184.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  185.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  186.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  187.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  188.   --x-includes=DIR        X include files are in DIR
  189.   --x-libraries=DIR       X library files are in DIR
  190. EOF
  191.     if test -n "$ac_help"; then
  192.       echo "--enable and --with options recognized:$ac_help"
  193.     fi
  194.     exit 0 ;;
  195.  
  196.   -host | --host | --hos | --ho)
  197.     ac_prev=host ;;
  198.   -host=* | --host=* | --hos=* | --ho=*)
  199.     host="$ac_optarg" ;;
  200.  
  201.   -includedir | --includedir | --includedi | --included | --include \
  202.   | --includ | --inclu | --incl | --inc)
  203.     ac_prev=includedir ;;
  204.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  205.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  206.     includedir="$ac_optarg" ;;
  207.  
  208.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  209.     ac_prev=infodir ;;
  210.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  211.     infodir="$ac_optarg" ;;
  212.  
  213.   -libdir | --libdir | --libdi | --libd)
  214.     ac_prev=libdir ;;
  215.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  216.     libdir="$ac_optarg" ;;
  217.  
  218.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  219.   | --libexe | --libex | --libe)
  220.     ac_prev=libexecdir ;;
  221.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  222.   | --libexe=* | --libex=* | --libe=*)
  223.     libexecdir="$ac_optarg" ;;
  224.  
  225.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  226.   | --localstate | --localstat | --localsta | --localst \
  227.   | --locals | --local | --loca | --loc | --lo)
  228.     ac_prev=localstatedir ;;
  229.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  230.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  231.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  232.     localstatedir="$ac_optarg" ;;
  233.  
  234.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  235.     ac_prev=mandir ;;
  236.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  237.     mandir="$ac_optarg" ;;
  238.  
  239.   -nfp | --nfp | --nf)
  240.     # Obsolete; use --without-fp.
  241.     with_fp=no ;;
  242.  
  243.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  244.   | --no-cr | --no-c)
  245.     no_create=yes ;;
  246.  
  247.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  248.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  249.     no_recursion=yes ;;
  250.  
  251.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  252.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  253.   | --oldin | --oldi | --old | --ol | --o)
  254.     ac_prev=oldincludedir ;;
  255.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  256.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  257.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  258.     oldincludedir="$ac_optarg" ;;
  259.  
  260.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  261.     ac_prev=prefix ;;
  262.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  263.     prefix="$ac_optarg" ;;
  264.  
  265.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  266.   | --program-pre | --program-pr | --program-p)
  267.     ac_prev=program_prefix ;;
  268.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  269.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  270.     program_prefix="$ac_optarg" ;;
  271.  
  272.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  273.   | --program-suf | --program-su | --program-s)
  274.     ac_prev=program_suffix ;;
  275.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  276.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  277.     program_suffix="$ac_optarg" ;;
  278.  
  279.   -program-transform-name | --program-transform-name \
  280.   | --program-transform-nam | --program-transform-na \
  281.   | --program-transform-n | --program-transform- \
  282.   | --program-transform | --program-transfor \
  283.   | --program-transfo | --program-transf \
  284.   | --program-trans | --program-tran \
  285.   | --progr-tra | --program-tr | --program-t)
  286.     ac_prev=program_transform_name ;;
  287.   -program-transform-name=* | --program-transform-name=* \
  288.   | --program-transform-nam=* | --program-transform-na=* \
  289.   | --program-transform-n=* | --program-transform-=* \
  290.   | --program-transform=* | --program-transfor=* \
  291.   | --program-transfo=* | --program-transf=* \
  292.   | --program-trans=* | --program-tran=* \
  293.   | --progr-tra=* | --program-tr=* | --program-t=*)
  294.     program_transform_name="$ac_optarg" ;;
  295.  
  296.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  297.   | -silent | --silent | --silen | --sile | --sil)
  298.     silent=yes ;;
  299.  
  300.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  301.     ac_prev=sbindir ;;
  302.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  303.   | --sbi=* | --sb=*)
  304.     sbindir="$ac_optarg" ;;
  305.  
  306.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  307.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  308.   | --sharedst | --shareds | --shared | --share | --shar \
  309.   | --sha | --sh)
  310.     ac_prev=sharedstatedir ;;
  311.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  312.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  313.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  314.   | --sha=* | --sh=*)
  315.     sharedstatedir="$ac_optarg" ;;
  316.  
  317.   -site | --site | --sit)
  318.     ac_prev=site ;;
  319.   -site=* | --site=* | --sit=*)
  320.     site="$ac_optarg" ;;
  321.  
  322.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  323.     ac_prev=srcdir ;;
  324.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  325.     srcdir="$ac_optarg" ;;
  326.  
  327.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  328.   | --syscon | --sysco | --sysc | --sys | --sy)
  329.     ac_prev=sysconfdir ;;
  330.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  331.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  332.     sysconfdir="$ac_optarg" ;;
  333.  
  334.   -target | --target | --targe | --targ | --tar | --ta | --t)
  335.     ac_prev=target ;;
  336.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  337.     target="$ac_optarg" ;;
  338.  
  339.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  340.     verbose=yes ;;
  341.  
  342.   -version | --version | --versio | --versi | --vers)
  343.     echo "configure generated by autoconf version 2.12"
  344.     exit 0 ;;
  345.  
  346.   -with-* | --with-*)
  347.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  348.     # Reject names that are not valid shell variable names.
  349.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  350.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  351.     fi
  352.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  353.     case "$ac_option" in
  354.       *=*) ;;
  355.       *) ac_optarg=yes ;;
  356.     esac
  357.     eval "with_${ac_package}='$ac_optarg'" ;;
  358.  
  359.   -without-* | --without-*)
  360.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  361.     # Reject names that are not valid shell variable names.
  362.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  363.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  364.     fi
  365.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  366.     eval "with_${ac_package}=no" ;;
  367.  
  368.   --x)
  369.     # Obsolete; use --with-x.
  370.     with_x=yes ;;
  371.  
  372.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  373.   | --x-incl | --x-inc | --x-in | --x-i)
  374.     ac_prev=x_includes ;;
  375.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  376.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  377.     x_includes="$ac_optarg" ;;
  378.  
  379.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  380.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  381.     ac_prev=x_libraries ;;
  382.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  383.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  384.     x_libraries="$ac_optarg" ;;
  385.  
  386.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  387.     ;;
  388.  
  389.   *)
  390.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  391.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  392.     fi
  393.     if test "x$nonopt" != xNONE; then
  394.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  395.     fi
  396.     nonopt="$ac_option"
  397.     ;;
  398.  
  399.   esac
  400. done
  401.  
  402. if test -n "$ac_prev"; then
  403.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  404. fi
  405.  
  406. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  407.  
  408. # File descriptor usage:
  409. # 0 standard input
  410. # 1 file creation
  411. # 2 errors and warnings
  412. # 3 some systems may open it to /dev/tty
  413. # 4 used on the Kubota Titan
  414. # 6 checking for... messages and results
  415. # 5 compiler messages saved in config.log
  416. if test "$silent" = yes; then
  417.   exec 6>/dev/null
  418. else
  419.   exec 6>&1
  420. fi
  421. exec 5>./config.log
  422.  
  423. echo "\
  424. This file contains any messages produced by compilers while
  425. running configure, to aid debugging if configure makes a mistake.
  426. " 1>&5
  427.  
  428. # Strip out --no-create and --no-recursion so they do not pile up.
  429. # Also quote any args containing shell metacharacters.
  430. ac_configure_args=
  431. for ac_arg
  432. do
  433.   case "$ac_arg" in
  434.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  435.   | --no-cr | --no-c) ;;
  436.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  437.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  438.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  439.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  440.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  441.   esac
  442. done
  443.  
  444. # NLS nuisances.
  445. # Only set these to C if already set.  These must not be set unconditionally
  446. # because not all systems understand e.g. LANG=C (notably SCO).
  447. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  448. # Non-C LC_CTYPE values break the ctype check.
  449. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  450. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  451. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  452. if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  453.  
  454. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  455. rm -rf conftest* confdefs.h
  456. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  457. echo > confdefs.h
  458.  
  459. # A filename unique to this package, relative to the directory that
  460. # configure is in, which we can look for to find out if srcdir is correct.
  461. ac_unique_file=pl-wam.c
  462.  
  463. # Find the source files, if location was not specified.
  464. if test -z "$srcdir"; then
  465.   ac_srcdir_defaulted=yes
  466.   # Try the directory containing this script, then its parent.
  467.   ac_prog=$0
  468.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  469.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  470.   srcdir=$ac_confdir
  471.   if test ! -r $srcdir/$ac_unique_file; then
  472.     srcdir=..
  473.   fi
  474. else
  475.   ac_srcdir_defaulted=no
  476. fi
  477. if test ! -r $srcdir/$ac_unique_file; then
  478.   if test "$ac_srcdir_defaulted" = yes; then
  479.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  480.   else
  481.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  482.   fi
  483. fi
  484. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  485.  
  486. # Prefer explicitly selected file to automatically selected ones.
  487. if test -z "$CONFIG_SITE"; then
  488.   if test "x$prefix" != xNONE; then
  489.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  490.   else
  491.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  492.   fi
  493. fi
  494. for ac_site_file in $CONFIG_SITE; do
  495.   if test -r "$ac_site_file"; then
  496.     echo "loading site script $ac_site_file"
  497.     . "$ac_site_file"
  498.   fi
  499. done
  500.  
  501. if test -r "$cache_file"; then
  502.   echo "loading cache $cache_file"
  503.   . $cache_file
  504. else
  505.   echo "creating cache $cache_file"
  506.   > $cache_file
  507. fi
  508.  
  509. ac_ext=c
  510. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  511. ac_cpp='$CPP $CPPFLAGS'
  512. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  513. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  514. cross_compiling=$ac_cv_prog_cc_cross
  515.  
  516. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  517.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  518.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  519.     ac_n= ac_c='
  520. ' ac_t='    '
  521.   else
  522.     ac_n=-n ac_c= ac_t=
  523.   fi
  524. else
  525.   ac_n= ac_c='\c' ac_t=
  526. fi
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550. INSTALLTARGET=dv-install
  551. PL=pl
  552. RT=""
  553. PLVERSION=`cat ../VERSION`
  554.  
  555.  
  556. true()
  557. { test a = a
  558. }
  559.  
  560. # Extract the first word of "gcc", so it can be a program name with args.
  561. set dummy gcc; ac_word=$2
  562. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  563. echo "configure:564: checking for $ac_word" >&5
  564. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  565.   echo $ac_n "(cached) $ac_c" 1>&6
  566. else
  567.   if test -n "$CC"; then
  568.   ac_cv_prog_CC="$CC" # Let the user override the test.
  569. else
  570.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  571.   for ac_dir in $PATH; do
  572.     test -z "$ac_dir" && ac_dir=.
  573.     if test -f $ac_dir/$ac_word; then
  574.       ac_cv_prog_CC="gcc"
  575.       break
  576.     fi
  577.   done
  578.   IFS="$ac_save_ifs"
  579. fi
  580. fi
  581. CC="$ac_cv_prog_CC"
  582. if test -n "$CC"; then
  583.   echo "$ac_t""$CC" 1>&6
  584. else
  585.   echo "$ac_t""no" 1>&6
  586. fi
  587.  
  588. if test -z "$CC"; then
  589.   # Extract the first word of "cc", so it can be a program name with args.
  590. set dummy cc; ac_word=$2
  591. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  592. echo "configure:593: checking for $ac_word" >&5
  593. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  594.   echo $ac_n "(cached) $ac_c" 1>&6
  595. else
  596.   if test -n "$CC"; then
  597.   ac_cv_prog_CC="$CC" # Let the user override the test.
  598. else
  599.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  600.   ac_prog_rejected=no
  601.   for ac_dir in $PATH; do
  602.     test -z "$ac_dir" && ac_dir=.
  603.     if test -f $ac_dir/$ac_word; then
  604.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  605.         ac_prog_rejected=yes
  606.     continue
  607.       fi
  608.       ac_cv_prog_CC="cc"
  609.       break
  610.     fi
  611.   done
  612.   IFS="$ac_save_ifs"
  613. if test $ac_prog_rejected = yes; then
  614.   # We found a bogon in the path, so make sure we never use it.
  615.   set dummy $ac_cv_prog_CC
  616.   shift
  617.   if test $# -gt 0; then
  618.     # We chose a different compiler from the bogus one.
  619.     # However, it has the same basename, so the bogon will be chosen
  620.     # first if we set CC to just the basename; use the full file name.
  621.     shift
  622.     set dummy "$ac_dir/$ac_word" "$@"
  623.     shift
  624.     ac_cv_prog_CC="$@"
  625.   fi
  626. fi
  627. fi
  628. fi
  629. CC="$ac_cv_prog_CC"
  630. if test -n "$CC"; then
  631.   echo "$ac_t""$CC" 1>&6
  632. else
  633.   echo "$ac_t""no" 1>&6
  634. fi
  635.  
  636.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  637. fi
  638.  
  639. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  640. echo "configure:641: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  641.  
  642. ac_ext=c
  643. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  644. ac_cpp='$CPP $CPPFLAGS'
  645. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  646. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  647. cross_compiling=$ac_cv_prog_cc_cross
  648.  
  649. cat > conftest.$ac_ext <<EOF
  650. #line 651 "configure"
  651. #include "confdefs.h"
  652. main(){return(0);}
  653. EOF
  654. if { (eval echo configure:655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  655.   ac_cv_prog_cc_works=yes
  656.   # If we can't run a trivial program, we are probably using a cross compiler.
  657.   if (./conftest; exit) 2>/dev/null; then
  658.     ac_cv_prog_cc_cross=no
  659.   else
  660.     ac_cv_prog_cc_cross=yes
  661.   fi
  662. else
  663.   echo "configure: failed program was:" >&5
  664.   cat conftest.$ac_ext >&5
  665.   ac_cv_prog_cc_works=no
  666. fi
  667. rm -fr conftest*
  668.  
  669. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  670. if test $ac_cv_prog_cc_works = no; then
  671.   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  672. fi
  673. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  674. echo "configure:675: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  675. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  676. cross_compiling=$ac_cv_prog_cc_cross
  677.  
  678. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  679. echo "configure:680: checking whether we are using GNU C" >&5
  680. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  681.   echo $ac_n "(cached) $ac_c" 1>&6
  682. else
  683.   cat > conftest.c <<EOF
  684. #ifdef __GNUC__
  685.   yes;
  686. #endif
  687. EOF
  688. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  689.   ac_cv_prog_gcc=yes
  690. else
  691.   ac_cv_prog_gcc=no
  692. fi
  693. fi
  694.  
  695. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  696.  
  697. if test $ac_cv_prog_gcc = yes; then
  698.   GCC=yes
  699.   ac_test_CFLAGS="${CFLAGS+set}"
  700.   ac_save_CFLAGS="$CFLAGS"
  701.   CFLAGS=
  702.   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  703. echo "configure:704: checking whether ${CC-cc} accepts -g" >&5
  704. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  705.   echo $ac_n "(cached) $ac_c" 1>&6
  706. else
  707.   echo 'void f(){}' > conftest.c
  708. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  709.   ac_cv_prog_cc_g=yes
  710. else
  711.   ac_cv_prog_cc_g=no
  712. fi
  713. rm -f conftest*
  714.  
  715. fi
  716.  
  717. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  718.   if test "$ac_test_CFLAGS" = set; then
  719.     CFLAGS="$ac_save_CFLAGS"
  720.   elif test $ac_cv_prog_cc_g = yes; then
  721.     CFLAGS="-g -O2"
  722.   else
  723.     CFLAGS="-O2"
  724.   fi
  725. else
  726.   GCC=
  727.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  728. fi
  729.  
  730. # Extract the first word of "ranlib", so it can be a program name with args.
  731. set dummy ranlib; ac_word=$2
  732. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  733. echo "configure:734: checking for $ac_word" >&5
  734. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  735.   echo $ac_n "(cached) $ac_c" 1>&6
  736. else
  737.   if test -n "$RANLIB"; then
  738.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  739. else
  740.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  741.   for ac_dir in $PATH; do
  742.     test -z "$ac_dir" && ac_dir=.
  743.     if test -f $ac_dir/$ac_word; then
  744.       ac_cv_prog_RANLIB="ranlib"
  745.       break
  746.     fi
  747.   done
  748.   IFS="$ac_save_ifs"
  749.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  750. fi
  751. fi
  752. RANLIB="$ac_cv_prog_RANLIB"
  753. if test -n "$RANLIB"; then
  754.   echo "$ac_t""$RANLIB" 1>&6
  755. else
  756.   echo "$ac_t""no" 1>&6
  757. fi
  758.  
  759. ac_aux_dir=
  760. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  761.   if test -f $ac_dir/install-sh; then
  762.     ac_aux_dir=$ac_dir
  763.     ac_install_sh="$ac_aux_dir/install-sh -c"
  764.     break
  765.   elif test -f $ac_dir/install.sh; then
  766.     ac_aux_dir=$ac_dir
  767.     ac_install_sh="$ac_aux_dir/install.sh -c"
  768.     break
  769.   fi
  770. done
  771. if test -z "$ac_aux_dir"; then
  772.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  773. fi
  774. ac_config_guess=$ac_aux_dir/config.guess
  775. ac_config_sub=$ac_aux_dir/config.sub
  776. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  777.  
  778.  
  779. # Make sure we can run config.sub.
  780. if $ac_config_sub sun4 >/dev/null 2>&1; then :
  781. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  782. fi
  783.  
  784. echo $ac_n "checking host system type""... $ac_c" 1>&6
  785. echo "configure:786: checking host system type" >&5
  786.  
  787. host_alias=$host
  788. case "$host_alias" in
  789. NONE)
  790.   case $nonopt in
  791.   NONE)
  792.     if host_alias=`$ac_config_guess`; then :
  793.     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  794.     fi ;;
  795.   *) host_alias=$nonopt ;;
  796.   esac ;;
  797. esac
  798.  
  799. host=`$ac_config_sub $host_alias`
  800. host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  801. host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  802. host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  803. echo "$ac_t""$host" 1>&6
  804.  
  805. ARCH=`echo $host | sed 's/\([^-]*\)-[^-]*-\([^-]*\)/\1-\2/'`
  806.  
  807. # Check whether --enable-syslibh or --disable-syslibh was given.
  808. if test "${enable_syslibh+set}" = set; then
  809.   enableval="$enable_syslibh"
  810.   case "$enableval" in
  811.               yes)    cat >> confdefs.h <<\EOF
  812. #define SYSLIB_H "syslib.h"
  813. EOF
  814.  
  815.             syslibh=yes ;;
  816.           no)   ;;
  817.           *)    cat >> confdefs.h <<\EOF
  818. #define SYSLIB_H "$enableval"
  819. EOF
  820.  
  821.             syslibh=yes ;;
  822.           esac
  823. fi
  824.  
  825.  
  826. # Check whether --enable-runtime or --disable-runtime was given.
  827. if test "${enable_runtime+set}" = set; then
  828.   enableval="$enable_runtime"
  829.   case "$enableval" in
  830.            yes) cat >> confdefs.h <<\EOF
  831. #define O_RUNTIME 1
  832. EOF
  833.  
  834.                 runtime=yes
  835.             RT=rt
  836.             INSTALLTARGET=rt-install ;;
  837.            *)  ;;
  838.            esac
  839. fi
  840.  
  841.  
  842.  
  843.  
  844. for ac_prog in make gmake
  845. do
  846. # Extract the first word of "$ac_prog", so it can be a program name with args.
  847. set dummy $ac_prog; ac_word=$2
  848. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  849. echo "configure:850: checking for $ac_word" >&5
  850. if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then
  851.   echo $ac_n "(cached) $ac_c" 1>&6
  852. else
  853.   if test -n "$MAKE"; then
  854.   ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
  855. else
  856.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  857.   for ac_dir in $PATH; do
  858.     test -z "$ac_dir" && ac_dir=.
  859.     if test -f $ac_dir/$ac_word; then
  860.       ac_cv_prog_MAKE="$ac_prog"
  861.       break
  862.     fi
  863.   done
  864.   IFS="$ac_save_ifs"
  865. fi
  866. fi
  867. MAKE="$ac_cv_prog_MAKE"
  868. if test -n "$MAKE"; then
  869.   echo "$ac_t""$MAKE" 1>&6
  870. else
  871.   echo "$ac_t""no" 1>&6
  872. fi
  873.  
  874. test -n "$MAKE" && break
  875. done
  876. test -n "$MAKE" || MAKE=""make""
  877.  
  878. echo $ac_n "checking "whether make is GNU-make"""... $ac_c" 1>&6
  879. echo "configure:880: checking "whether make is GNU-make"" >&5
  880. if ($MAKE -v 2>&1) | grep GNU > /dev/null; then
  881.     echo "$ac_t""yes" 1>&6
  882.     VPATH="vpath %.c"
  883. else
  884.     VPATH="VPATH = "
  885.     echo "$ac_t""no" 1>&6
  886. fi
  887.  
  888.  
  889. # Extract the first word of "ar", so it can be a program name with args.
  890. set dummy ar; ac_word=$2
  891. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  892. echo "configure:893: checking for $ac_word" >&5
  893. if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
  894.   echo $ac_n "(cached) $ac_c" 1>&6
  895. else
  896.   if test -n "$AR"; then
  897.   ac_cv_prog_AR="$AR" # Let the user override the test.
  898. else
  899.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  900.   for ac_dir in $PATH; do
  901.     test -z "$ac_dir" && ac_dir=.
  902.     if test -f $ac_dir/$ac_word; then
  903.       ac_cv_prog_AR="ar"
  904.       break
  905.     fi
  906.   done
  907.   IFS="$ac_save_ifs"
  908.   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
  909. fi
  910. fi
  911. AR="$ac_cv_prog_AR"
  912. if test -n "$AR"; then
  913.   echo "$ac_t""$AR" 1>&6
  914. else
  915.   echo "$ac_t""no" 1>&6
  916. fi
  917.  
  918. for ac_prog in etags ctags
  919. do
  920. # Extract the first word of "$ac_prog", so it can be a program name with args.
  921. set dummy $ac_prog; ac_word=$2
  922. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  923. echo "configure:924: checking for $ac_word" >&5
  924. if eval "test \"`echo '$''{'ac_cv_prog_ETAGS'+set}'`\" = set"; then
  925.   echo $ac_n "(cached) $ac_c" 1>&6
  926. else
  927.   if test -n "$ETAGS"; then
  928.   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
  929. else
  930.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  931.   for ac_dir in $PATH; do
  932.     test -z "$ac_dir" && ac_dir=.
  933.     if test -f $ac_dir/$ac_word; then
  934.       ac_cv_prog_ETAGS="$ac_prog"
  935.       break
  936.     fi
  937.   done
  938.   IFS="$ac_save_ifs"
  939. fi
  940. fi
  941. ETAGS="$ac_cv_prog_ETAGS"
  942. if test -n "$ETAGS"; then
  943.   echo "$ac_t""$ETAGS" 1>&6
  944. else
  945.   echo "$ac_t""no" 1>&6
  946. fi
  947.  
  948. test -n "$ETAGS" && break
  949. done
  950. test -n "$ETAGS" || ETAGS="":""
  951.  
  952. for ac_prog in mawk gawk nawk awk
  953. do
  954. # Extract the first word of "$ac_prog", so it can be a program name with args.
  955. set dummy $ac_prog; ac_word=$2
  956. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  957. echo "configure:958: checking for $ac_word" >&5
  958. if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
  959.   echo $ac_n "(cached) $ac_c" 1>&6
  960. else
  961.   if test -n "$AWK"; then
  962.   ac_cv_prog_AWK="$AWK" # Let the user override the test.
  963. else
  964.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  965.   for ac_dir in $PATH; do
  966.     test -z "$ac_dir" && ac_dir=.
  967.     if test -f $ac_dir/$ac_word; then
  968.       ac_cv_prog_AWK="$ac_prog"
  969.       break
  970.     fi
  971.   done
  972.   IFS="$ac_save_ifs"
  973. fi
  974. fi
  975. AWK="$ac_cv_prog_AWK"
  976. if test -n "$AWK"; then
  977.   echo "$ac_t""$AWK" 1>&6
  978. else
  979.   echo "$ac_t""no" 1>&6
  980. fi
  981.  
  982. test -n "$AWK" && break
  983. done
  984.  
  985. # Find a good install program.  We prefer a C program (faster),
  986. # so one script is as good as another.  But avoid the broken or
  987. # incompatible versions:
  988. # SysV /etc/install, /usr/sbin/install
  989. # SunOS /usr/etc/install
  990. # IRIX /sbin/install
  991. # AIX /bin/install
  992. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  993. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  994. # ./install, which can be erroneously created by make from ./install.sh.
  995. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  996. echo "configure:997: checking for a BSD compatible install" >&5
  997. if test -z "$INSTALL"; then
  998. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  999.   echo $ac_n "(cached) $ac_c" 1>&6
  1000. else
  1001.     IFS="${IFS=     }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
  1002.   for ac_dir in $PATH; do
  1003.     # Account for people who put trailing slashes in PATH elements.
  1004.     case "$ac_dir/" in
  1005.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  1006.     *)
  1007.       # OSF1 and SCO ODT 3.0 have their own names for install.
  1008.       for ac_prog in ginstall installbsd scoinst install; do
  1009.         if test -f $ac_dir/$ac_prog; then
  1010.       if test $ac_prog = install &&
  1011.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  1012.         # AIX install.  It has an incompatible calling convention.
  1013.         # OSF/1 installbsd also uses dspmsg, but is usable.
  1014.         :
  1015.       else
  1016.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  1017.         break 2
  1018.       fi
  1019.     fi
  1020.       done
  1021.       ;;
  1022.     esac
  1023.   done
  1024.   IFS="$ac_save_IFS"
  1025.  
  1026. fi
  1027.   if test "${ac_cv_path_install+set}" = set; then
  1028.     INSTALL="$ac_cv_path_install"
  1029.   else
  1030.     # As a last resort, use the slow shell script.  We don't cache a
  1031.     # path for INSTALL within a source directory, because that will
  1032.     # break other packages using the cache if that directory is
  1033.     # removed, or if the path is relative.
  1034.     INSTALL="$ac_install_sh"
  1035.   fi
  1036. fi
  1037. echo "$ac_t""$INSTALL" 1>&6
  1038.  
  1039. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  1040. # It thinks the first close brace ends the variable substitution.
  1041. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  1042.  
  1043. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  1044.  
  1045. case "$INSTALL" in
  1046.     ./*) if test -z "$PWD"; then PWD=`pwd`; fi
  1047.          INSTALL="$PWD/$INSTALL" ;;
  1048. esac
  1049. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  1050. echo "configure:1051: checking how to run the C preprocessor" >&5
  1051. # On Suns, sometimes $CPP names a directory.
  1052. if test -n "$CPP" && test -d "$CPP"; then
  1053.   CPP=
  1054. fi
  1055. if test -z "$CPP"; then
  1056. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  1057.   echo $ac_n "(cached) $ac_c" 1>&6
  1058. else
  1059.     # This must be in double quotes, not single quotes, because CPP may get
  1060.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  1061.   CPP="${CC-cc} -E"
  1062.   # On the NeXT, cc -E runs the code through the compiler's parser,
  1063.   # not just through cpp.
  1064.   cat > conftest.$ac_ext <<EOF
  1065. #line 1066 "configure"
  1066. #include "confdefs.h"
  1067. #include <assert.h>
  1068. Syntax Error
  1069. EOF
  1070. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1071. { (eval echo configure:1072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1072. ac_err=`grep -v '^ *+' conftest.out`
  1073. if test -z "$ac_err"; then
  1074.   :
  1075. else
  1076.   echo "$ac_err" >&5
  1077.   echo "configure: failed program was:" >&5
  1078.   cat conftest.$ac_ext >&5
  1079.   rm -rf conftest*
  1080.   CPP="${CC-cc} -E -traditional-cpp"
  1081.   cat > conftest.$ac_ext <<EOF
  1082. #line 1083 "configure"
  1083. #include "confdefs.h"
  1084. #include <assert.h>
  1085. Syntax Error
  1086. EOF
  1087. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1088. { (eval echo configure:1089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1089. ac_err=`grep -v '^ *+' conftest.out`
  1090. if test -z "$ac_err"; then
  1091.   :
  1092. else
  1093.   echo "$ac_err" >&5
  1094.   echo "configure: failed program was:" >&5
  1095.   cat conftest.$ac_ext >&5
  1096.   rm -rf conftest*
  1097.   CPP=/lib/cpp
  1098. fi
  1099. rm -f conftest*
  1100. fi
  1101. rm -f conftest*
  1102.   ac_cv_prog_CPP="$CPP"
  1103. fi
  1104.   CPP="$ac_cv_prog_CPP"
  1105. else
  1106.   ac_cv_prog_CPP="$CPP"
  1107. fi
  1108. echo "$ac_t""$CPP" 1>&6
  1109.  
  1110. echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
  1111. echo "configure:1112: checking for POSIXized ISC" >&5
  1112. if test -d /etc/conf/kconfig.d &&
  1113.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  1114. then
  1115.   echo "$ac_t""yes" 1>&6
  1116.   ISC=yes # If later tests want to check for ISC.
  1117.   cat >> confdefs.h <<\EOF
  1118. #define _POSIX_SOURCE 1
  1119. EOF
  1120.  
  1121.   if test "$GCC" = yes; then
  1122.     CC="$CC -posix"
  1123.   else
  1124.     CC="$CC -Xp"
  1125.   fi
  1126. else
  1127.   echo "$ac_t""no" 1>&6
  1128.   ISC=
  1129. fi
  1130.  
  1131. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1132. echo "configure:1133: checking for ANSI C header files" >&5
  1133. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1134.   echo $ac_n "(cached) $ac_c" 1>&6
  1135. else
  1136.   cat > conftest.$ac_ext <<EOF
  1137. #line 1138 "configure"
  1138. #include "confdefs.h"
  1139. #include <stdlib.h>
  1140. #include <stdarg.h>
  1141. #include <string.h>
  1142. #include <float.h>
  1143. EOF
  1144. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1145. { (eval echo configure:1146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1146. ac_err=`grep -v '^ *+' conftest.out`
  1147. if test -z "$ac_err"; then
  1148.   rm -rf conftest*
  1149.   ac_cv_header_stdc=yes
  1150. else
  1151.   echo "$ac_err" >&5
  1152.   echo "configure: failed program was:" >&5
  1153.   cat conftest.$ac_ext >&5
  1154.   rm -rf conftest*
  1155.   ac_cv_header_stdc=no
  1156. fi
  1157. rm -f conftest*
  1158.  
  1159. if test $ac_cv_header_stdc = yes; then
  1160.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1161. cat > conftest.$ac_ext <<EOF
  1162. #line 1163 "configure"
  1163. #include "confdefs.h"
  1164. #include <string.h>
  1165. EOF
  1166. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1167.   egrep "memchr" >/dev/null 2>&1; then
  1168.   :
  1169. else
  1170.   rm -rf conftest*
  1171.   ac_cv_header_stdc=no
  1172. fi
  1173. rm -f conftest*
  1174.  
  1175. fi
  1176.  
  1177. if test $ac_cv_header_stdc = yes; then
  1178.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1179. cat > conftest.$ac_ext <<EOF
  1180. #line 1181 "configure"
  1181. #include "confdefs.h"
  1182. #include <stdlib.h>
  1183. EOF
  1184. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1185.   egrep "free" >/dev/null 2>&1; then
  1186.   :
  1187. else
  1188.   rm -rf conftest*
  1189.   ac_cv_header_stdc=no
  1190. fi
  1191. rm -f conftest*
  1192.  
  1193. fi
  1194.  
  1195. if test $ac_cv_header_stdc = yes; then
  1196.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1197. if test "$cross_compiling" = yes; then
  1198.   :
  1199. else
  1200.   cat > conftest.$ac_ext <<EOF
  1201. #line 1202 "configure"
  1202. #include "confdefs.h"
  1203. #include <ctype.h>
  1204. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1205. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1206. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1207. int main () { int i; for (i = 0; i < 256; i++)
  1208. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1209. exit (0); }
  1210.  
  1211. EOF
  1212. if { (eval echo configure:1213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1213. then
  1214.   :
  1215. else
  1216.   echo "configure: failed program was:" >&5
  1217.   cat conftest.$ac_ext >&5
  1218.   rm -fr conftest*
  1219.   ac_cv_header_stdc=no
  1220. fi
  1221. rm -fr conftest*
  1222. fi
  1223.  
  1224. fi
  1225. fi
  1226.  
  1227. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1228. if test $ac_cv_header_stdc = yes; then
  1229.   cat >> confdefs.h <<\EOF
  1230. #define STDC_HEADERS 1
  1231. EOF
  1232.  
  1233. fi
  1234.  
  1235. if test "$GCC" = "yes"; then
  1236.     COFLAGS=-O2
  1237.     if test "$ac_cv_header_stdc" = "yes" || test "$syslibh" = "yes"; then
  1238.         CWFLAGS=-Wall
  1239.     else
  1240.     CWFLAGS=
  1241.     fi
  1242.     CMFLAGS=-funsigned-char
  1243. else
  1244.     COFLAGS=-O
  1245.     CWFLAGS=
  1246.     CMFLAGS=
  1247. fi
  1248. CFLAGS="$CMFLAGS"
  1249. echo $ac_n "checking for inline""... $ac_c" 1>&6
  1250. echo "configure:1251: checking for inline" >&5
  1251. if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
  1252.   echo $ac_n "(cached) $ac_c" 1>&6
  1253. else
  1254.   ac_cv_c_inline=no
  1255. for ac_kw in inline __inline__ __inline; do
  1256.   cat > conftest.$ac_ext <<EOF
  1257. #line 1258 "configure"
  1258. #include "confdefs.h"
  1259.  
  1260. int main() {
  1261. } $ac_kw foo() {
  1262. ; return 0; }
  1263. EOF
  1264. if { (eval echo configure:1265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1265.   rm -rf conftest*
  1266.   ac_cv_c_inline=$ac_kw; break
  1267. else
  1268.   echo "configure: failed program was:" >&5
  1269.   cat conftest.$ac_ext >&5
  1270. fi
  1271. rm -f conftest*
  1272. done
  1273.  
  1274. fi
  1275.  
  1276. echo "$ac_t""$ac_cv_c_inline" 1>&6
  1277. case "$ac_cv_c_inline" in
  1278.   inline | yes) ;;
  1279.   no) cat >> confdefs.h <<\EOF
  1280. #define inline 
  1281. EOF
  1282.  ;;
  1283.   *)  cat >> confdefs.h <<EOF
  1284. #define inline $ac_cv_c_inline
  1285. EOF
  1286.  ;;
  1287. esac
  1288.  
  1289. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  1290. # for constant arguments.  Useless!
  1291. echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
  1292. echo "configure:1293: checking for working alloca.h" >&5
  1293. if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
  1294.   echo $ac_n "(cached) $ac_c" 1>&6
  1295. else
  1296.   cat > conftest.$ac_ext <<EOF
  1297. #line 1298 "configure"
  1298. #include "confdefs.h"
  1299. #include <alloca.h>
  1300. int main() {
  1301. char *p = alloca(2 * sizeof(int));
  1302. ; return 0; }
  1303. EOF
  1304. if { (eval echo configure:1305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1305.   rm -rf conftest*
  1306.   ac_cv_header_alloca_h=yes
  1307. else
  1308.   echo "configure: failed program was:" >&5
  1309.   cat conftest.$ac_ext >&5
  1310.   rm -rf conftest*
  1311.   ac_cv_header_alloca_h=no
  1312. fi
  1313. rm -f conftest*
  1314. fi
  1315.  
  1316. echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
  1317. if test $ac_cv_header_alloca_h = yes; then
  1318.   cat >> confdefs.h <<\EOF
  1319. #define HAVE_ALLOCA_H 1
  1320. EOF
  1321.  
  1322. fi
  1323.  
  1324. echo $ac_n "checking for alloca""... $ac_c" 1>&6
  1325. echo "configure:1326: checking for alloca" >&5
  1326. if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
  1327.   echo $ac_n "(cached) $ac_c" 1>&6
  1328. else
  1329.   cat > conftest.$ac_ext <<EOF
  1330. #line 1331 "configure"
  1331. #include "confdefs.h"
  1332.  
  1333. #ifdef __GNUC__
  1334. # define alloca __builtin_alloca
  1335. #else
  1336. # if HAVE_ALLOCA_H
  1337. #  include <alloca.h>
  1338. # else
  1339. #  ifdef _AIX
  1340.  #pragma alloca
  1341. #  else
  1342. #   ifndef alloca /* predefined by HP cc +Olibcalls */
  1343. char *alloca ();
  1344. #   endif
  1345. #  endif
  1346. # endif
  1347. #endif
  1348.  
  1349. int main() {
  1350. char *p = (char *) alloca(1);
  1351. ; return 0; }
  1352. EOF
  1353. if { (eval echo configure:1354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1354.   rm -rf conftest*
  1355.   ac_cv_func_alloca_works=yes
  1356. else
  1357.   echo "configure: failed program was:" >&5
  1358.   cat conftest.$ac_ext >&5
  1359.   rm -rf conftest*
  1360.   ac_cv_func_alloca_works=no
  1361. fi
  1362. rm -f conftest*
  1363. fi
  1364.  
  1365. echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
  1366. if test $ac_cv_func_alloca_works = yes; then
  1367.   cat >> confdefs.h <<\EOF
  1368. #define HAVE_ALLOCA 1
  1369. EOF
  1370.  
  1371. fi
  1372.  
  1373. if test $ac_cv_func_alloca_works = no; then
  1374.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  1375.   # that cause trouble.  Some versions do not even contain alloca or
  1376.   # contain a buggy version.  If you still want to use their alloca,
  1377.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  1378.   ALLOCA=alloca.o
  1379.   cat >> confdefs.h <<\EOF
  1380. #define C_ALLOCA 1
  1381. EOF
  1382.  
  1383.  
  1384. echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
  1385. echo "configure:1386: checking whether alloca needs Cray hooks" >&5
  1386. if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
  1387.   echo $ac_n "(cached) $ac_c" 1>&6
  1388. else
  1389.   cat > conftest.$ac_ext <<EOF
  1390. #line 1391 "configure"
  1391. #include "confdefs.h"
  1392. #if defined(CRAY) && ! defined(CRAY2)
  1393. webecray
  1394. #else
  1395. wenotbecray
  1396. #endif
  1397.  
  1398. EOF
  1399. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1400.   egrep "webecray" >/dev/null 2>&1; then
  1401.   rm -rf conftest*
  1402.   ac_cv_os_cray=yes
  1403. else
  1404.   rm -rf conftest*
  1405.   ac_cv_os_cray=no
  1406. fi
  1407. rm -f conftest*
  1408.  
  1409. fi
  1410.  
  1411. echo "$ac_t""$ac_cv_os_cray" 1>&6
  1412. if test $ac_cv_os_cray = yes; then
  1413. for ac_func in _getb67 GETB67 getb67; do
  1414.   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1415. echo "configure:1416: checking for $ac_func" >&5
  1416. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1417.   echo $ac_n "(cached) $ac_c" 1>&6
  1418. else
  1419.   cat > conftest.$ac_ext <<EOF
  1420. #line 1421 "configure"
  1421. #include "confdefs.h"
  1422. /* System header to define __stub macros and hopefully few prototypes,
  1423.     which can conflict with char $ac_func(); below.  */
  1424. #include <assert.h>
  1425. /* Override any gcc2 internal prototype to avoid an error.  */
  1426. /* We use char because int might match the return type of a gcc2
  1427.     builtin and then its argument prototype would still apply.  */
  1428. char $ac_func();
  1429.  
  1430. int main() {
  1431.  
  1432. /* The GNU C library defines this for functions which it implements
  1433.     to always fail with ENOSYS.  Some functions are actually named
  1434.     something starting with __ and the normal name is an alias.  */
  1435. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1436. choke me
  1437. #else
  1438. $ac_func();
  1439. #endif
  1440.  
  1441. ; return 0; }
  1442. EOF
  1443. if { (eval echo configure:1444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1444.   rm -rf conftest*
  1445.   eval "ac_cv_func_$ac_func=yes"
  1446. else
  1447.   echo "configure: failed program was:" >&5
  1448.   cat conftest.$ac_ext >&5
  1449.   rm -rf conftest*
  1450.   eval "ac_cv_func_$ac_func=no"
  1451. fi
  1452. rm -f conftest*
  1453. fi
  1454.  
  1455. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1456.   echo "$ac_t""yes" 1>&6
  1457.   cat >> confdefs.h <<EOF
  1458. #define CRAY_STACKSEG_END $ac_func
  1459. EOF
  1460.  
  1461.   break
  1462. else
  1463.   echo "$ac_t""no" 1>&6
  1464. fi
  1465.  
  1466. done
  1467. fi
  1468.  
  1469. echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
  1470. echo "configure:1471: checking stack direction for C alloca" >&5
  1471. if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
  1472.   echo $ac_n "(cached) $ac_c" 1>&6
  1473. else
  1474.   if test "$cross_compiling" = yes; then
  1475.   ac_cv_c_stack_direction=0
  1476. else
  1477.   cat > conftest.$ac_ext <<EOF
  1478. #line 1479 "configure"
  1479. #include "confdefs.h"
  1480. find_stack_direction ()
  1481. {
  1482.   static char *addr = 0;
  1483.   auto char dummy;
  1484.   if (addr == 0)
  1485.     {
  1486.       addr = &dummy;
  1487.       return find_stack_direction ();
  1488.     }
  1489.   else
  1490.     return (&dummy > addr) ? 1 : -1;
  1491. }
  1492. main ()
  1493. {
  1494.   exit (find_stack_direction() < 0);
  1495. }
  1496. EOF
  1497. if { (eval echo configure:1498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1498. then
  1499.   ac_cv_c_stack_direction=1
  1500. else
  1501.   echo "configure: failed program was:" >&5
  1502.   cat conftest.$ac_ext >&5
  1503.   rm -fr conftest*
  1504.   ac_cv_c_stack_direction=-1
  1505. fi
  1506. rm -fr conftest*
  1507. fi
  1508.  
  1509. fi
  1510.  
  1511. echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
  1512. cat >> confdefs.h <<EOF
  1513. #define STACK_DIRECTION $ac_cv_c_stack_direction
  1514. EOF
  1515.  
  1516. fi
  1517.  
  1518. echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
  1519. echo "configure:1520: checking whether byte ordering is bigendian" >&5
  1520. if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
  1521.   echo $ac_n "(cached) $ac_c" 1>&6
  1522. else
  1523.   ac_cv_c_bigendian=unknown
  1524. # See if sys/param.h defines the BYTE_ORDER macro.
  1525. cat > conftest.$ac_ext <<EOF
  1526. #line 1527 "configure"
  1527. #include "confdefs.h"
  1528. #include <sys/types.h>
  1529. #include <sys/param.h>
  1530. int main() {
  1531.  
  1532. #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
  1533.  bogus endian macros
  1534. #endif
  1535. ; return 0; }
  1536. EOF
  1537. if { (eval echo configure:1538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1538.   rm -rf conftest*
  1539.   # It does; now see whether it defined to BIG_ENDIAN or not.
  1540. cat > conftest.$ac_ext <<EOF
  1541. #line 1542 "configure"
  1542. #include "confdefs.h"
  1543. #include <sys/types.h>
  1544. #include <sys/param.h>
  1545. int main() {
  1546.  
  1547. #if BYTE_ORDER != BIG_ENDIAN
  1548.  not big endian
  1549. #endif
  1550. ; return 0; }
  1551. EOF
  1552. if { (eval echo configure:1553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1553.   rm -rf conftest*
  1554.   ac_cv_c_bigendian=yes
  1555. else
  1556.   echo "configure: failed program was:" >&5
  1557.   cat conftest.$ac_ext >&5
  1558.   rm -rf conftest*
  1559.   ac_cv_c_bigendian=no
  1560. fi
  1561. rm -f conftest*
  1562. else
  1563.   echo "configure: failed program was:" >&5
  1564.   cat conftest.$ac_ext >&5
  1565. fi
  1566. rm -f conftest*
  1567. if test $ac_cv_c_bigendian = unknown; then
  1568. if test "$cross_compiling" = yes; then
  1569.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1570. else
  1571.   cat > conftest.$ac_ext <<EOF
  1572. #line 1573 "configure"
  1573. #include "confdefs.h"
  1574. main () {
  1575.   /* Are we little or big endian?  From Harbison&Steele.  */
  1576.   union
  1577.   {
  1578.     long l;
  1579.     char c[sizeof (long)];
  1580.   } u;
  1581.   u.l = 1;
  1582.   exit (u.c[sizeof (long) - 1] == 1);
  1583. }
  1584. EOF
  1585. if { (eval echo configure:1586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1586. then
  1587.   ac_cv_c_bigendian=no
  1588. else
  1589.   echo "configure: failed program was:" >&5
  1590.   cat conftest.$ac_ext >&5
  1591.   rm -fr conftest*
  1592.   ac_cv_c_bigendian=yes
  1593. fi
  1594. rm -fr conftest*
  1595. fi
  1596.  
  1597. fi
  1598. fi
  1599.  
  1600. echo "$ac_t""$ac_cv_c_bigendian" 1>&6
  1601. if test $ac_cv_c_bigendian = yes; then
  1602.   cat >> confdefs.h <<\EOF
  1603. #define WORDS_BIGENDIAN 1
  1604. EOF
  1605.  
  1606. fi
  1607.  
  1608.  
  1609.  
  1610. echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
  1611. echo "configure:1612: checking for main in -lm" >&5
  1612. ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
  1613. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1614.   echo $ac_n "(cached) $ac_c" 1>&6
  1615. else
  1616.   ac_save_LIBS="$LIBS"
  1617. LIBS="-lm  $LIBS"
  1618. cat > conftest.$ac_ext <<EOF
  1619. #line 1620 "configure"
  1620. #include "confdefs.h"
  1621.  
  1622. int main() {
  1623. main()
  1624. ; return 0; }
  1625. EOF
  1626. if { (eval echo configure:1627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1627.   rm -rf conftest*
  1628.   eval "ac_cv_lib_$ac_lib_var=yes"
  1629. else
  1630.   echo "configure: failed program was:" >&5
  1631.   cat conftest.$ac_ext >&5
  1632.   rm -rf conftest*
  1633.   eval "ac_cv_lib_$ac_lib_var=no"
  1634. fi
  1635. rm -f conftest*
  1636. LIBS="$ac_save_LIBS"
  1637.  
  1638. fi
  1639. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1640.   echo "$ac_t""yes" 1>&6
  1641.     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1642.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1643.   cat >> confdefs.h <<EOF
  1644. #define $ac_tr_lib 1
  1645. EOF
  1646.  
  1647.   LIBS="-lm $LIBS"
  1648.  
  1649. else
  1650.   echo "$ac_t""no" 1>&6
  1651. fi
  1652.  
  1653. echo $ac_n "checking for main in -ltermcap""... $ac_c" 1>&6
  1654. echo "configure:1655: checking for main in -ltermcap" >&5
  1655. ac_lib_var=`echo termcap'_'main | sed 'y%./+-%__p_%'`
  1656. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1657.   echo $ac_n "(cached) $ac_c" 1>&6
  1658. else
  1659.   ac_save_LIBS="$LIBS"
  1660. LIBS="-ltermcap  $LIBS"
  1661. cat > conftest.$ac_ext <<EOF
  1662. #line 1663 "configure"
  1663. #include "confdefs.h"
  1664.  
  1665. int main() {
  1666. main()
  1667. ; return 0; }
  1668. EOF
  1669. if { (eval echo configure:1670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1670.   rm -rf conftest*
  1671.   eval "ac_cv_lib_$ac_lib_var=yes"
  1672. else
  1673.   echo "configure: failed program was:" >&5
  1674.   cat conftest.$ac_ext >&5
  1675.   rm -rf conftest*
  1676.   eval "ac_cv_lib_$ac_lib_var=no"
  1677. fi
  1678. rm -f conftest*
  1679. LIBS="$ac_save_LIBS"
  1680.  
  1681. fi
  1682. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1683.   echo "$ac_t""yes" 1>&6
  1684.     ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1685.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1686.   cat >> confdefs.h <<EOF
  1687. #define $ac_tr_lib 1
  1688. EOF
  1689.  
  1690.   LIBS="-ltermcap $LIBS"
  1691.  
  1692. else
  1693.   echo "$ac_t""no" 1>&6
  1694. fi
  1695.  
  1696. if test "$ac_cv_lib_termcap_main" = "yes"; then
  1697.   echo $ac_n "checking "whether -ltermcap needs -lucb"""... $ac_c" 1>&6
  1698. echo "configure:1699: checking "whether -ltermcap needs -lucb"" >&5
  1699.   cat > conftest.$ac_ext <<EOF
  1700. #line 1701 "configure"
  1701. #include "confdefs.h"
  1702.  
  1703. int main() {
  1704.  tgetent();
  1705.           
  1706. ; return 0; }
  1707. EOF
  1708. if { (eval echo configure:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1709.   rm -rf conftest*
  1710.   echo "$ac_t""no" 1>&6
  1711.           true
  1712. else
  1713.   echo "configure: failed program was:" >&5
  1714.   cat conftest.$ac_ext >&5
  1715.   rm -rf conftest*
  1716.   echo "$ac_t""maybe ..." 1>&6
  1717.           checkucb=yes
  1718. fi
  1719. rm -f conftest*
  1720. else
  1721.   echo $ac_n "checking for main in -lncurses""... $ac_c" 1>&6
  1722. echo "configure:1723: checking for main in -lncurses" >&5
  1723. ac_lib_var=`echo ncurses'_'main | sed 'y%./+-%__p_%'`
  1724. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1725.   echo $ac_n "(cached) $ac_c" 1>&6
  1726. else
  1727.   ac_save_LIBS="$LIBS"
  1728. LIBS="-lncurses  $LIBS"
  1729. cat > conftest.$ac_ext <<EOF
  1730. #line 1731 "configure"
  1731. #include "confdefs.h"
  1732.  
  1733. int main() {
  1734. main()
  1735. ; return 0; }
  1736. EOF
  1737. if { (eval echo configure:1738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1738.   rm -rf conftest*
  1739.   eval "ac_cv_lib_$ac_lib_var=yes"
  1740. else
  1741.   echo "configure: failed program was:" >&5
  1742.   cat conftest.$ac_ext >&5
  1743.   rm -rf conftest*
  1744.   eval "ac_cv_lib_$ac_lib_var=no"
  1745. fi
  1746. rm -f conftest*
  1747. LIBS="$ac_save_LIBS"
  1748.  
  1749. fi
  1750. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1751.   echo "$ac_t""yes" 1>&6
  1752.     ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1753.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1754.   cat >> confdefs.h <<EOF
  1755. #define $ac_tr_lib 1
  1756. EOF
  1757.  
  1758.   LIBS="-lncurses $LIBS"
  1759.  
  1760. else
  1761.   echo "$ac_t""no" 1>&6
  1762. fi
  1763.  
  1764.   if test ! "$ac_cv_lib_ncurses_main" = "yes"; then
  1765.     echo $ac_n "checking for main in -lcurses""... $ac_c" 1>&6
  1766. echo "configure:1767: checking for main in -lcurses" >&5
  1767. ac_lib_var=`echo curses'_'main | sed 'y%./+-%__p_%'`
  1768. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1769.   echo $ac_n "(cached) $ac_c" 1>&6
  1770. else
  1771.   ac_save_LIBS="$LIBS"
  1772. LIBS="-lcurses  $LIBS"
  1773. cat > conftest.$ac_ext <<EOF
  1774. #line 1775 "configure"
  1775. #include "confdefs.h"
  1776.  
  1777. int main() {
  1778. main()
  1779. ; return 0; }
  1780. EOF
  1781. if { (eval echo configure:1782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1782.   rm -rf conftest*
  1783.   eval "ac_cv_lib_$ac_lib_var=yes"
  1784. else
  1785.   echo "configure: failed program was:" >&5
  1786.   cat conftest.$ac_ext >&5
  1787.   rm -rf conftest*
  1788.   eval "ac_cv_lib_$ac_lib_var=no"
  1789. fi
  1790. rm -f conftest*
  1791. LIBS="$ac_save_LIBS"
  1792.  
  1793. fi
  1794. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1795.   echo "$ac_t""yes" 1>&6
  1796.     ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1797.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1798.   cat >> confdefs.h <<EOF
  1799. #define $ac_tr_lib 1
  1800. EOF
  1801.  
  1802.   LIBS="-lcurses $LIBS"
  1803.  
  1804. else
  1805.   echo "$ac_t""no" 1>&6
  1806. fi
  1807.  
  1808.   fi
  1809. fi
  1810. if test "$checkucb" = "yes"; then
  1811.     echo $ac_n "checking for rindex in -lucb""... $ac_c" 1>&6
  1812. echo "configure:1813: checking for rindex in -lucb" >&5
  1813. ac_lib_var=`echo ucb'_'rindex | sed 'y%./+-%__p_%'`
  1814. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1815.   echo $ac_n "(cached) $ac_c" 1>&6
  1816. else
  1817.   ac_save_LIBS="$LIBS"
  1818. LIBS="-lucb  $LIBS"
  1819. cat > conftest.$ac_ext <<EOF
  1820. #line 1821 "configure"
  1821. #include "confdefs.h"
  1822. /* Override any gcc2 internal prototype to avoid an error.  */
  1823. /* We use char because int might match the return type of a gcc2
  1824.     builtin and then its argument prototype would still apply.  */
  1825. char rindex();
  1826.  
  1827. int main() {
  1828. rindex()
  1829. ; return 0; }
  1830. EOF
  1831. if { (eval echo configure:1832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1832.   rm -rf conftest*
  1833.   eval "ac_cv_lib_$ac_lib_var=yes"
  1834. else
  1835.   echo "configure: failed program was:" >&5
  1836.   cat conftest.$ac_ext >&5
  1837.   rm -rf conftest*
  1838.   eval "ac_cv_lib_$ac_lib_var=no"
  1839. fi
  1840. rm -f conftest*
  1841. LIBS="$ac_save_LIBS"
  1842.  
  1843. fi
  1844. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1845.   echo "$ac_t""yes" 1>&6
  1846.     ac_tr_lib=HAVE_LIB`echo ucb | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1847.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1848.   cat >> confdefs.h <<EOF
  1849. #define $ac_tr_lib 1
  1850. EOF
  1851.  
  1852.   LIBS="-lucb $LIBS"
  1853.  
  1854. else
  1855.   echo "$ac_t""no" 1>&6
  1856. fi
  1857.  
  1858. fi
  1859. if test ! "$runtime" = "yes"; then
  1860.   echo $ac_n "checking for main in -lreadline""... $ac_c" 1>&6
  1861. echo "configure:1862: checking for main in -lreadline" >&5
  1862. ac_lib_var=`echo readline'_'main | sed 'y%./+-%__p_%'`
  1863. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1864.   echo $ac_n "(cached) $ac_c" 1>&6
  1865. else
  1866.   ac_save_LIBS="$LIBS"
  1867. LIBS="-lreadline  $LIBS"
  1868. cat > conftest.$ac_ext <<EOF
  1869. #line 1870 "configure"
  1870. #include "confdefs.h"
  1871.  
  1872. int main() {
  1873. main()
  1874. ; return 0; }
  1875. EOF
  1876. if { (eval echo configure:1877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1877.   rm -rf conftest*
  1878.   eval "ac_cv_lib_$ac_lib_var=yes"
  1879. else
  1880.   echo "configure: failed program was:" >&5
  1881.   cat conftest.$ac_ext >&5
  1882.   rm -rf conftest*
  1883.   eval "ac_cv_lib_$ac_lib_var=no"
  1884. fi
  1885. rm -f conftest*
  1886. LIBS="$ac_save_LIBS"
  1887.  
  1888. fi
  1889. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1890.   echo "$ac_t""yes" 1>&6
  1891.     ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1892.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1893.   cat >> confdefs.h <<EOF
  1894. #define $ac_tr_lib 1
  1895. EOF
  1896.  
  1897.   LIBS="-lreadline $LIBS"
  1898.  
  1899. else
  1900.   echo "$ac_t""no" 1>&6
  1901. fi
  1902.  
  1903.   if test ! "$ac_cv_lib_readline_main" = "yes"; then
  1904.     echo $ac_n "checking for main in -lncurses""... $ac_c" 1>&6
  1905. echo "configure:1906: checking for main in -lncurses" >&5
  1906. ac_lib_var=`echo ncurses'_'main | sed 'y%./+-%__p_%'`
  1907. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1908.   echo $ac_n "(cached) $ac_c" 1>&6
  1909. else
  1910.   ac_save_LIBS="$LIBS"
  1911. LIBS="-lncurses  $LIBS"
  1912. cat > conftest.$ac_ext <<EOF
  1913. #line 1914 "configure"
  1914. #include "confdefs.h"
  1915.  
  1916. int main() {
  1917. main()
  1918. ; return 0; }
  1919. EOF
  1920. if { (eval echo configure:1921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1921.   rm -rf conftest*
  1922.   eval "ac_cv_lib_$ac_lib_var=yes"
  1923. else
  1924.   echo "configure: failed program was:" >&5
  1925.   cat conftest.$ac_ext >&5
  1926.   rm -rf conftest*
  1927.   eval "ac_cv_lib_$ac_lib_var=no"
  1928. fi
  1929. rm -f conftest*
  1930. LIBS="$ac_save_LIBS"
  1931.  
  1932. fi
  1933. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1934.   echo "$ac_t""yes" 1>&6
  1935.     ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1936.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1937.   cat >> confdefs.h <<EOF
  1938. #define $ac_tr_lib 1
  1939. EOF
  1940.  
  1941.   LIBS="-lncurses $LIBS"
  1942.  
  1943. else
  1944.   echo "$ac_t""no" 1>&6
  1945. fi
  1946.  
  1947.     if test ! "$ac_cv_lib_ncurses_main" = "yes"; then
  1948.       echo $ac_n "checking for main in -lcurses""... $ac_c" 1>&6
  1949. echo "configure:1950: checking for main in -lcurses" >&5
  1950. ac_lib_var=`echo curses'_'main | sed 'y%./+-%__p_%'`
  1951. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1952.   echo $ac_n "(cached) $ac_c" 1>&6
  1953. else
  1954.   ac_save_LIBS="$LIBS"
  1955. LIBS="-lcurses  $LIBS"
  1956. cat > conftest.$ac_ext <<EOF
  1957. #line 1958 "configure"
  1958. #include "confdefs.h"
  1959.  
  1960. int main() {
  1961. main()
  1962. ; return 0; }
  1963. EOF
  1964. if { (eval echo configure:1965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1965.   rm -rf conftest*
  1966.   eval "ac_cv_lib_$ac_lib_var=yes"
  1967. else
  1968.   echo "configure: failed program was:" >&5
  1969.   cat conftest.$ac_ext >&5
  1970.   rm -rf conftest*
  1971.   eval "ac_cv_lib_$ac_lib_var=no"
  1972. fi
  1973. rm -f conftest*
  1974. LIBS="$ac_save_LIBS"
  1975.  
  1976. fi
  1977. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1978.   echo "$ac_t""yes" 1>&6
  1979.     ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1980.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1981.   cat >> confdefs.h <<EOF
  1982. #define $ac_tr_lib 1
  1983. EOF
  1984.  
  1985.   LIBS="-lcurses $LIBS"
  1986.  
  1987. else
  1988.   echo "$ac_t""no" 1>&6
  1989. fi
  1990.  
  1991.     fi
  1992.     if test "$ac_cv_lib_ncurses_main" = "yes" || test "$ac_cv_lib_curses_main" = "yes"; then
  1993.       echo "Found curses library.  See if -lreadline works now"
  1994.       unset ac_cv_lib_readline_main
  1995.       echo $ac_n "checking for main in -lreadline""... $ac_c" 1>&6
  1996. echo "configure:1997: checking for main in -lreadline" >&5
  1997. ac_lib_var=`echo readline'_'main | sed 'y%./+-%__p_%'`
  1998. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1999.   echo $ac_n "(cached) $ac_c" 1>&6
  2000. else
  2001.   ac_save_LIBS="$LIBS"
  2002. LIBS="-lreadline  $LIBS"
  2003. cat > conftest.$ac_ext <<EOF
  2004. #line 2005 "configure"
  2005. #include "confdefs.h"
  2006.  
  2007. int main() {
  2008. main()
  2009. ; return 0; }
  2010. EOF
  2011. if { (eval echo configure:2012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2012.   rm -rf conftest*
  2013.   eval "ac_cv_lib_$ac_lib_var=yes"
  2014. else
  2015.   echo "configure: failed program was:" >&5
  2016.   cat conftest.$ac_ext >&5
  2017.   rm -rf conftest*
  2018.   eval "ac_cv_lib_$ac_lib_var=no"
  2019. fi
  2020. rm -f conftest*
  2021. LIBS="$ac_save_LIBS"
  2022.  
  2023. fi
  2024. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2025.   echo "$ac_t""yes" 1>&6
  2026.     ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  2027.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  2028.   cat >> confdefs.h <<EOF
  2029. #define $ac_tr_lib 1
  2030. EOF
  2031.  
  2032.   LIBS="-lreadline $LIBS"
  2033.  
  2034. else
  2035.   echo "$ac_t""no" 1>&6
  2036. fi
  2037.  
  2038.     fi
  2039.   fi
  2040. fi
  2041. # Check whether --enable-shared or --disable-shared was given.
  2042. if test "${enable_shared+set}" = set; then
  2043.   enableval="$enable_shared"
  2044.   configshared="$enableval"
  2045. else
  2046.   configshared=yes
  2047. fi
  2048.  
  2049. # Check whether --enable-save or --disable-save was given.
  2050. if test "${enable_save+set}" = set; then
  2051.   enableval="$enable_save"
  2052.   configsave="$enableval"
  2053. else
  2054.   configsave=no
  2055. fi
  2056.  
  2057.  
  2058. if test "$configsave" = "yes"; then
  2059.     echo $ac_n "checking for main in -lelf""... $ac_c" 1>&6
  2060. echo "configure:2061: checking for main in -lelf" >&5
  2061. ac_lib_var=`echo elf'_'main | sed 'y%./+-%__p_%'`
  2062. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2063.   echo $ac_n "(cached) $ac_c" 1>&6
  2064. else
  2065.   ac_save_LIBS="$LIBS"
  2066. LIBS="-lelf  $LIBS"
  2067. cat > conftest.$ac_ext <<EOF
  2068. #line 2069 "configure"
  2069. #include "confdefs.h"
  2070.  
  2071. int main() {
  2072. main()
  2073. ; return 0; }
  2074. EOF
  2075. if { (eval echo configure:2076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2076.   rm -rf conftest*
  2077.   eval "ac_cv_lib_$ac_lib_var=yes"
  2078. else
  2079.   echo "configure: failed program was:" >&5
  2080.   cat conftest.$ac_ext >&5
  2081.   rm -rf conftest*
  2082.   eval "ac_cv_lib_$ac_lib_var=no"
  2083. fi
  2084. rm -f conftest*
  2085. LIBS="$ac_save_LIBS"
  2086.  
  2087. fi
  2088. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2089.   echo "$ac_t""yes" 1>&6
  2090.     ac_tr_lib=HAVE_LIB`echo elf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  2091.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  2092.   cat >> confdefs.h <<EOF
  2093. #define $ac_tr_lib 1
  2094. EOF
  2095.  
  2096.   LIBS="-lelf $LIBS"
  2097.  
  2098. else
  2099.   echo "$ac_t""no" 1>&6
  2100. fi
  2101.  
  2102. fi
  2103. if test "$configshared" = "yes"; then
  2104.   echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
  2105. echo "configure:2106: checking for dlopen in -ldl" >&5
  2106. ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  2107. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2108.   echo $ac_n "(cached) $ac_c" 1>&6
  2109. else
  2110.   ac_save_LIBS="$LIBS"
  2111. LIBS="-ldl  $LIBS"
  2112. cat > conftest.$ac_ext <<EOF
  2113. #line 2114 "configure"
  2114. #include "confdefs.h"
  2115. /* Override any gcc2 internal prototype to avoid an error.  */
  2116. /* We use char because int might match the return type of a gcc2
  2117.     builtin and then its argument prototype would still apply.  */
  2118. char dlopen();
  2119.  
  2120. int main() {
  2121. dlopen()
  2122. ; return 0; }
  2123. EOF
  2124. if { (eval echo configure:2125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2125.   rm -rf conftest*
  2126.   eval "ac_cv_lib_$ac_lib_var=yes"
  2127. else
  2128.   echo "configure: failed program was:" >&5
  2129.   cat conftest.$ac_ext >&5
  2130.   rm -rf conftest*
  2131.   eval "ac_cv_lib_$ac_lib_var=no"
  2132. fi
  2133. rm -f conftest*
  2134. LIBS="$ac_save_LIBS"
  2135.  
  2136. fi
  2137. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2138.   echo "$ac_t""yes" 1>&6
  2139.     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  2140.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  2141.   cat >> confdefs.h <<EOF
  2142. #define $ac_tr_lib 1
  2143. EOF
  2144.  
  2145.   LIBS="-ldl $LIBS"
  2146.  
  2147. else
  2148.   echo "$ac_t""no" 1>&6
  2149. fi
  2150.  
  2151.   echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
  2152. echo "configure:2153: checking for shl_load in -ldld" >&5
  2153. ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  2154. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2155.   echo $ac_n "(cached) $ac_c" 1>&6
  2156. else
  2157.   ac_save_LIBS="$LIBS"
  2158. LIBS="-ldld  $LIBS"
  2159. cat > conftest.$ac_ext <<EOF
  2160. #line 2161 "configure"
  2161. #include "confdefs.h"
  2162. /* Override any gcc2 internal prototype to avoid an error.  */
  2163. /* We use char because int might match the return type of a gcc2
  2164.     builtin and then its argument prototype would still apply.  */
  2165. char shl_load();
  2166.  
  2167. int main() {
  2168. shl_load()
  2169. ; return 0; }
  2170. EOF
  2171. if { (eval echo configure:2172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2172.   rm -rf conftest*
  2173.   eval "ac_cv_lib_$ac_lib_var=yes"
  2174. else
  2175.   echo "configure: failed program was:" >&5
  2176.   cat conftest.$ac_ext >&5
  2177.   rm -rf conftest*
  2178.   eval "ac_cv_lib_$ac_lib_var=no"
  2179. fi
  2180. rm -f conftest*
  2181. LIBS="$ac_save_LIBS"
  2182.  
  2183. fi
  2184. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2185.   echo "$ac_t""yes" 1>&6
  2186.     ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  2187.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  2188.   cat >> confdefs.h <<EOF
  2189. #define $ac_tr_lib 1
  2190. EOF
  2191.  
  2192.   LIBS="-ldld $LIBS"
  2193.  
  2194. else
  2195.   echo "$ac_t""no" 1>&6
  2196. fi
  2197.  
  2198.   for ac_func in dlopen
  2199. do
  2200. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2201. echo "configure:2202: checking for $ac_func" >&5
  2202. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2203.   echo $ac_n "(cached) $ac_c" 1>&6
  2204. else
  2205.   cat > conftest.$ac_ext <<EOF
  2206. #line 2207 "configure"
  2207. #include "confdefs.h"
  2208. /* System header to define __stub macros and hopefully few prototypes,
  2209.     which can conflict with char $ac_func(); below.  */
  2210. #include <assert.h>
  2211. /* Override any gcc2 internal prototype to avoid an error.  */
  2212. /* We use char because int might match the return type of a gcc2
  2213.     builtin and then its argument prototype would still apply.  */
  2214. char $ac_func();
  2215.  
  2216. int main() {
  2217.  
  2218. /* The GNU C library defines this for functions which it implements
  2219.     to always fail with ENOSYS.  Some functions are actually named
  2220.     something starting with __ and the normal name is an alias.  */
  2221. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2222. choke me
  2223. #else
  2224. $ac_func();
  2225. #endif
  2226.  
  2227. ; return 0; }
  2228. EOF
  2229. if { (eval echo configure:2230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2230.   rm -rf conftest*
  2231.   eval "ac_cv_func_$ac_func=yes"
  2232. else
  2233.   echo "configure: failed program was:" >&5
  2234.   cat conftest.$ac_ext >&5
  2235.   rm -rf conftest*
  2236.   eval "ac_cv_func_$ac_func=no"
  2237. fi
  2238. rm -f conftest*
  2239. fi
  2240.  
  2241. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2242.   echo "$ac_t""yes" 1>&6
  2243.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2244.   cat >> confdefs.h <<EOF
  2245. #define $ac_tr_func 1
  2246. EOF
  2247.  
  2248. else
  2249.   echo "$ac_t""no" 1>&6
  2250. fi
  2251. done
  2252.  
  2253.   for ac_func in shl_load
  2254. do
  2255. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2256. echo "configure:2257: checking for $ac_func" >&5
  2257. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2258.   echo $ac_n "(cached) $ac_c" 1>&6
  2259. else
  2260.   cat > conftest.$ac_ext <<EOF
  2261. #line 2262 "configure"
  2262. #include "confdefs.h"
  2263. /* System header to define __stub macros and hopefully few prototypes,
  2264.     which can conflict with char $ac_func(); below.  */
  2265. #include <assert.h>
  2266. /* Override any gcc2 internal prototype to avoid an error.  */
  2267. /* We use char because int might match the return type of a gcc2
  2268.     builtin and then its argument prototype would still apply.  */
  2269. char $ac_func();
  2270.  
  2271. int main() {
  2272.  
  2273. /* The GNU C library defines this for functions which it implements
  2274.     to always fail with ENOSYS.  Some functions are actually named
  2275.     something starting with __ and the normal name is an alias.  */
  2276. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2277. choke me
  2278. #else
  2279. $ac_func();
  2280. #endif
  2281.  
  2282. ; return 0; }
  2283. EOF
  2284. if { (eval echo configure:2285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2285.   rm -rf conftest*
  2286.   eval "ac_cv_func_$ac_func=yes"
  2287. else
  2288.   echo "configure: failed program was:" >&5
  2289.   cat conftest.$ac_ext >&5
  2290.   rm -rf conftest*
  2291.   eval "ac_cv_func_$ac_func=no"
  2292. fi
  2293. rm -f conftest*
  2294. fi
  2295.  
  2296. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2297.   echo "$ac_t""yes" 1>&6
  2298.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2299.   cat >> confdefs.h <<EOF
  2300. #define $ac_tr_func 1
  2301. EOF
  2302.  
  2303. else
  2304.   echo "$ac_t""no" 1>&6
  2305. fi
  2306. done
  2307.  
  2308. fi
  2309.  
  2310. if test "$ac_cv_func_dlopen" = "yes" || \
  2311.    test "$ac_cv_func_shl_load" = "yes"; then
  2312.   configloadforeign=no
  2313.  
  2314. echo $ac_n "checking for cc -c -o""... $ac_c" 1>&6
  2315. echo "configure:2316: checking for cc -c -o" >&5
  2316.   cat > conftest.c << _EOP_
  2317. main()
  2318. { exit(0);
  2319. }
  2320. _EOP_
  2321.   if ${CC-cc} $CFLAGS -c conftest.c -o conftest.o 1>&5 2>&5 && test -r conftest.o; then
  2322.     COUTOPT='-o $@'
  2323.     echo "$ac_t""yes" 1>&6
  2324.   else
  2325.     COUTOPT=
  2326.     echo "$ac_t""no" 1>&6
  2327.   fi
  2328.   rm -rf conftest.*
  2329.  
  2330.  
  2331. echo $ac_n "checking "whether LDFLAGS need -export-dynamic"""... $ac_c" 1>&6
  2332. echo "configure:2333: checking "whether LDFLAGS need -export-dynamic"" >&5
  2333.   old_ldflags="$LDFLAGS"
  2334.   LDFLAGS="-export-dynamic $LDFLAGS"
  2335.   if test "$cross_compiling" = yes; then
  2336.   echo "$ac_t""no" 1>&6
  2337.      LDFLAGS="$old_ldflags"
  2338. else
  2339.   cat > conftest.$ac_ext <<EOF
  2340. #line 2341 "configure"
  2341. #include "confdefs.h"
  2342. main()
  2343. { exit(0);
  2344. }
  2345. EOF
  2346. if { (eval echo configure:2347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2347. then
  2348.   if grep 'unrecognized option `-export-dynamic'"'" config.log >/dev/null; then
  2349.        echo "$ac_t""no" 1>&6
  2350.        LDFLAGS="$old_ldflags"
  2351.      else
  2352.        echo "$ac_t""yes" 1>&6
  2353.        exportdynamic=done
  2354.      fi
  2355. else
  2356.   echo "configure: failed program was:" >&5
  2357.   cat conftest.$ac_ext >&5
  2358.   rm -fr conftest*
  2359.   echo "$ac_t""no" 1>&6
  2360.      LDFLAGS="$old_ldflags"
  2361. fi
  2362. rm -fr conftest*
  2363. fi
  2364.  
  2365.  
  2366. if test "$exportdynamic" != "done"; then
  2367. echo $ac_n "checking "whether LDFLAGS need -rdynamic"""... $ac_c" 1>&6
  2368. echo "configure:2369: checking "whether LDFLAGS need -rdynamic"" >&5
  2369.   old_ldflags="$LDFLAGS"
  2370.   LDFLAGS="-rdynamic $LDFLAGS"
  2371.   if test "$cross_compiling" = yes; then
  2372.   echo "$ac_t""no" 1>&6
  2373.      LDFLAGS="$old_ldflags"
  2374. else
  2375.   cat > conftest.$ac_ext <<EOF
  2376. #line 2377 "configure"
  2377. #include "confdefs.h"
  2378. main()
  2379. { exit(0);
  2380. }
  2381. EOF
  2382. if { (eval echo configure:2383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2383. then
  2384.   if grep 'unrecognized option `-rdynamic'"'" config.log >/dev/null; then
  2385.        echo "$ac_t""no" 1>&6
  2386.        LDFLAGS="$old_ldflags"
  2387.      else
  2388.        echo "$ac_t""yes" 1>&6
  2389.      fi
  2390. else
  2391.   echo "configure: failed program was:" >&5
  2392.   cat conftest.$ac_ext >&5
  2393.   rm -fr conftest*
  2394.   echo "$ac_t""no" 1>&6
  2395.      LDFLAGS="$old_ldflags"
  2396. fi
  2397. rm -fr conftest*
  2398. fi
  2399.  
  2400. fi
  2401. else
  2402.   configloadforeign=yes
  2403. fi
  2404.  
  2405. echo "    LIBS=$LIBS"
  2406.  
  2407. for ac_hdr in unistd.h string.h memory.h sys/time.h sys/stat.h pwd.h
  2408. do
  2409. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2410. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2411. echo "configure:2412: checking for $ac_hdr" >&5
  2412. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2413.   echo $ac_n "(cached) $ac_c" 1>&6
  2414. else
  2415.   cat > conftest.$ac_ext <<EOF
  2416. #line 2417 "configure"
  2417. #include "confdefs.h"
  2418. #include <$ac_hdr>
  2419. EOF
  2420. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2421. { (eval echo configure:2422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2422. ac_err=`grep -v '^ *+' conftest.out`
  2423. if test -z "$ac_err"; then
  2424.   rm -rf conftest*
  2425.   eval "ac_cv_header_$ac_safe=yes"
  2426. else
  2427.   echo "$ac_err" >&5
  2428.   echo "configure: failed program was:" >&5
  2429.   cat conftest.$ac_ext >&5
  2430.   rm -rf conftest*
  2431.   eval "ac_cv_header_$ac_safe=no"
  2432. fi
  2433. rm -f conftest*
  2434. fi
  2435. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2436.   echo "$ac_t""yes" 1>&6
  2437.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2438.   cat >> confdefs.h <<EOF
  2439. #define $ac_tr_hdr 1
  2440. EOF
  2441.  
  2442. else
  2443.   echo "$ac_t""no" 1>&6
  2444. fi
  2445. done
  2446.  
  2447. for ac_hdr in sys/select.h sys/param.h sys/file.h sys/resource.h malloc.h
  2448. do
  2449. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2450. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2451. echo "configure:2452: checking for $ac_hdr" >&5
  2452. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2453.   echo $ac_n "(cached) $ac_c" 1>&6
  2454. else
  2455.   cat > conftest.$ac_ext <<EOF
  2456. #line 2457 "configure"
  2457. #include "confdefs.h"
  2458. #include <$ac_hdr>
  2459. EOF
  2460. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2461. { (eval echo configure:2462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2462. ac_err=`grep -v '^ *+' conftest.out`
  2463. if test -z "$ac_err"; then
  2464.   rm -rf conftest*
  2465.   eval "ac_cv_header_$ac_safe=yes"
  2466. else
  2467.   echo "$ac_err" >&5
  2468.   echo "configure: failed program was:" >&5
  2469.   cat conftest.$ac_ext >&5
  2470.   rm -rf conftest*
  2471.   eval "ac_cv_header_$ac_safe=no"
  2472. fi
  2473. rm -f conftest*
  2474. fi
  2475. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2476.   echo "$ac_t""yes" 1>&6
  2477.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2478.   cat >> confdefs.h <<EOF
  2479. #define $ac_tr_hdr 1
  2480. EOF
  2481.  
  2482. else
  2483.   echo "$ac_t""no" 1>&6
  2484. fi
  2485. done
  2486.  
  2487. for ac_hdr in sys/termios.h sys/termio.h bstring.h
  2488. do
  2489. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2490. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2491. echo "configure:2492: checking for $ac_hdr" >&5
  2492. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2493.   echo $ac_n "(cached) $ac_c" 1>&6
  2494. else
  2495.   cat > conftest.$ac_ext <<EOF
  2496. #line 2497 "configure"
  2497. #include "confdefs.h"
  2498. #include <$ac_hdr>
  2499. EOF
  2500. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2501. { (eval echo configure:2502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2502. ac_err=`grep -v '^ *+' conftest.out`
  2503. if test -z "$ac_err"; then
  2504.   rm -rf conftest*
  2505.   eval "ac_cv_header_$ac_safe=yes"
  2506. else
  2507.   echo "$ac_err" >&5
  2508.   echo "configure: failed program was:" >&5
  2509.   cat conftest.$ac_ext >&5
  2510.   rm -rf conftest*
  2511.   eval "ac_cv_header_$ac_safe=no"
  2512. fi
  2513. rm -f conftest*
  2514. fi
  2515. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2516.   echo "$ac_t""yes" 1>&6
  2517.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2518.   cat >> confdefs.h <<EOF
  2519. #define $ac_tr_hdr 1
  2520. EOF
  2521.  
  2522. else
  2523.   echo "$ac_t""no" 1>&6
  2524. fi
  2525. done
  2526.  
  2527. for ac_hdr in mach-o/rld.h
  2528. do
  2529. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2530. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2531. echo "configure:2532: checking for $ac_hdr" >&5
  2532. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2533.   echo $ac_n "(cached) $ac_c" 1>&6
  2534. else
  2535.   cat > conftest.$ac_ext <<EOF
  2536. #line 2537 "configure"
  2537. #include "confdefs.h"
  2538. #include <$ac_hdr>
  2539. EOF
  2540. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2541. { (eval echo configure:2542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2542. ac_err=`grep -v '^ *+' conftest.out`
  2543. if test -z "$ac_err"; then
  2544.   rm -rf conftest*
  2545.   eval "ac_cv_header_$ac_safe=yes"
  2546. else
  2547.   echo "$ac_err" >&5
  2548.   echo "configure: failed program was:" >&5
  2549.   cat conftest.$ac_ext >&5
  2550.   rm -rf conftest*
  2551.   eval "ac_cv_header_$ac_safe=no"
  2552. fi
  2553. rm -f conftest*
  2554. fi
  2555. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2556.   echo "$ac_t""yes" 1>&6
  2557.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2558.   cat >> confdefs.h <<EOF
  2559. #define $ac_tr_hdr 1
  2560. EOF
  2561.  
  2562. else
  2563.   echo "$ac_t""no" 1>&6
  2564. fi
  2565. done
  2566.  
  2567.  
  2568. for ac_func in access chmod dossleep fstat readlink getwd getcwd getdtablesize
  2569. do
  2570. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2571. echo "configure:2572: checking for $ac_func" >&5
  2572. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2573.   echo $ac_n "(cached) $ac_c" 1>&6
  2574. else
  2575.   cat > conftest.$ac_ext <<EOF
  2576. #line 2577 "configure"
  2577. #include "confdefs.h"
  2578. /* System header to define __stub macros and hopefully few prototypes,
  2579.     which can conflict with char $ac_func(); below.  */
  2580. #include <assert.h>
  2581. /* Override any gcc2 internal prototype to avoid an error.  */
  2582. /* We use char because int might match the return type of a gcc2
  2583.     builtin and then its argument prototype would still apply.  */
  2584. char $ac_func();
  2585.  
  2586. int main() {
  2587.  
  2588. /* The GNU C library defines this for functions which it implements
  2589.     to always fail with ENOSYS.  Some functions are actually named
  2590.     something starting with __ and the normal name is an alias.  */
  2591. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2592. choke me
  2593. #else
  2594. $ac_func();
  2595. #endif
  2596.  
  2597. ; return 0; }
  2598. EOF
  2599. if { (eval echo configure:2600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2600.   rm -rf conftest*
  2601.   eval "ac_cv_func_$ac_func=yes"
  2602. else
  2603.   echo "configure: failed program was:" >&5
  2604.   cat conftest.$ac_ext >&5
  2605.   rm -rf conftest*
  2606.   eval "ac_cv_func_$ac_func=no"
  2607. fi
  2608. rm -f conftest*
  2609. fi
  2610.  
  2611. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2612.   echo "$ac_t""yes" 1>&6
  2613.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2614.   cat >> confdefs.h <<EOF
  2615. #define $ac_tr_func 1
  2616. EOF
  2617.  
  2618. else
  2619.   echo "$ac_t""no" 1>&6
  2620. fi
  2621. done
  2622.  
  2623. for ac_func in getpagesize getpwnam getrlimit gettimeofday opendir sysconf
  2624. do
  2625. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2626. echo "configure:2627: checking for $ac_func" >&5
  2627. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2628.   echo $ac_n "(cached) $ac_c" 1>&6
  2629. else
  2630.   cat > conftest.$ac_ext <<EOF
  2631. #line 2632 "configure"
  2632. #include "confdefs.h"
  2633. /* System header to define __stub macros and hopefully few prototypes,
  2634.     which can conflict with char $ac_func(); below.  */
  2635. #include <assert.h>
  2636. /* Override any gcc2 internal prototype to avoid an error.  */
  2637. /* We use char because int might match the return type of a gcc2
  2638.     builtin and then its argument prototype would still apply.  */
  2639. char $ac_func();
  2640.  
  2641. int main() {
  2642.  
  2643. /* The GNU C library defines this for functions which it implements
  2644.     to always fail with ENOSYS.  Some functions are actually named
  2645.     something starting with __ and the normal name is an alias.  */
  2646. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2647. choke me
  2648. #else
  2649. $ac_func();
  2650. #endif
  2651.  
  2652. ; return 0; }
  2653. EOF
  2654. if { (eval echo configure:2655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2655.   rm -rf conftest*
  2656.   eval "ac_cv_func_$ac_func=yes"
  2657. else
  2658.   echo "configure: failed program was:" >&5
  2659.   cat conftest.$ac_ext >&5
  2660.   rm -rf conftest*
  2661.   eval "ac_cv_func_$ac_func=no"
  2662. fi
  2663. rm -f conftest*
  2664. fi
  2665.  
  2666. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2667.   echo "$ac_t""yes" 1>&6
  2668.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2669.   cat >> confdefs.h <<EOF
  2670. #define $ac_tr_func 1
  2671. EOF
  2672.  
  2673. else
  2674.   echo "$ac_t""no" 1>&6
  2675. fi
  2676. done
  2677.  
  2678. for ac_func in popen putenv random remove rename rl_insert_close select
  2679. do
  2680. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2681. echo "configure:2682: checking for $ac_func" >&5
  2682. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2683.   echo $ac_n "(cached) $ac_c" 1>&6
  2684. else
  2685.   cat > conftest.$ac_ext <<EOF
  2686. #line 2687 "configure"
  2687. #include "confdefs.h"
  2688. /* System header to define __stub macros and hopefully few prototypes,
  2689.     which can conflict with char $ac_func(); below.  */
  2690. #include <assert.h>
  2691. /* Override any gcc2 internal prototype to avoid an error.  */
  2692. /* We use char because int might match the return type of a gcc2
  2693.     builtin and then its argument prototype would still apply.  */
  2694. char $ac_func();
  2695.  
  2696. int main() {
  2697.  
  2698. /* The GNU C library defines this for functions which it implements
  2699.     to always fail with ENOSYS.  Some functions are actually named
  2700.     something starting with __ and the normal name is an alias.  */
  2701. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2702. choke me
  2703. #else
  2704. $ac_func();
  2705. #endif
  2706.  
  2707. ; return 0; }
  2708. EOF
  2709. if { (eval echo configure:2710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2710.   rm -rf conftest*
  2711.   eval "ac_cv_func_$ac_func=yes"
  2712. else
  2713.   echo "configure: failed program was:" >&5
  2714.   cat conftest.$ac_ext >&5
  2715.   rm -rf conftest*
  2716.   eval "ac_cv_func_$ac_func=no"
  2717. fi
  2718. rm -f conftest*
  2719. fi
  2720.  
  2721. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2722.   echo "$ac_t""yes" 1>&6
  2723.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2724.   cat >> confdefs.h <<EOF
  2725. #define $ac_tr_func 1
  2726. EOF
  2727.  
  2728. else
  2729.   echo "$ac_t""no" 1>&6
  2730. fi
  2731. done
  2732.  
  2733. for ac_func in signal sigset sleep srand srandom stat strerror tgetent times
  2734. do
  2735. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2736. echo "configure:2737: checking for $ac_func" >&5
  2737. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2738.   echo $ac_n "(cached) $ac_c" 1>&6
  2739. else
  2740.   cat > conftest.$ac_ext <<EOF
  2741. #line 2742 "configure"
  2742. #include "confdefs.h"
  2743. /* System header to define __stub macros and hopefully few prototypes,
  2744.     which can conflict with char $ac_func(); below.  */
  2745. #include <assert.h>
  2746. /* Override any gcc2 internal prototype to avoid an error.  */
  2747. /* We use char because int might match the return type of a gcc2
  2748.     builtin and then its argument prototype would still apply.  */
  2749. char $ac_func();
  2750.  
  2751. int main() {
  2752.  
  2753. /* The GNU C library defines this for functions which it implements
  2754.     to always fail with ENOSYS.  Some functions are actually named
  2755.     something starting with __ and the normal name is an alias.  */
  2756. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2757. choke me
  2758. #else
  2759. $ac_func();
  2760. #endif
  2761.  
  2762. ; return 0; }
  2763. EOF
  2764. if { (eval echo configure:2765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2765.   rm -rf conftest*
  2766.   eval "ac_cv_func_$ac_func=yes"
  2767. else
  2768.   echo "configure: failed program was:" >&5
  2769.   cat conftest.$ac_ext >&5
  2770.   rm -rf conftest*
  2771.   eval "ac_cv_func_$ac_func=no"
  2772. fi
  2773. rm -f conftest*
  2774. fi
  2775.  
  2776. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2777.   echo "$ac_t""yes" 1>&6
  2778.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2779.   cat >> confdefs.h <<EOF
  2780. #define $ac_tr_func 1
  2781. EOF
  2782.  
  2783. else
  2784.   echo "$ac_t""no" 1>&6
  2785. fi
  2786. done
  2787.  
  2788. for ac_func in memmove stricmp strlwr sigaction sigsetmask siggetmask sigblock
  2789. do
  2790. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2791. echo "configure:2792: checking for $ac_func" >&5
  2792. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2793.   echo $ac_n "(cached) $ac_c" 1>&6
  2794. else
  2795.   cat > conftest.$ac_ext <<EOF
  2796. #line 2797 "configure"
  2797. #include "confdefs.h"
  2798. /* System header to define __stub macros and hopefully few prototypes,
  2799.     which can conflict with char $ac_func(); below.  */
  2800. #include <assert.h>
  2801. /* Override any gcc2 internal prototype to avoid an error.  */
  2802. /* We use char because int might match the return type of a gcc2
  2803.     builtin and then its argument prototype would still apply.  */
  2804. char $ac_func();
  2805.  
  2806. int main() {
  2807.  
  2808. /* The GNU C library defines this for functions which it implements
  2809.     to always fail with ENOSYS.  Some functions are actually named
  2810.     something starting with __ and the normal name is an alias.  */
  2811. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2812. choke me
  2813. #else
  2814. $ac_func();
  2815. #endif
  2816.  
  2817. ; return 0; }
  2818. EOF
  2819. if { (eval echo configure:2820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2820.   rm -rf conftest*
  2821.   eval "ac_cv_func_$ac_func=yes"
  2822. else
  2823.   echo "configure: failed program was:" >&5
  2824.   cat conftest.$ac_ext >&5
  2825.   rm -rf conftest*
  2826.   eval "ac_cv_func_$ac_func=no"
  2827. fi
  2828. rm -f conftest*
  2829. fi
  2830.  
  2831. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2832.   echo "$ac_t""yes" 1>&6
  2833.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2834.   cat >> confdefs.h <<EOF
  2835. #define $ac_tr_func 1
  2836. EOF
  2837.  
  2838. else
  2839.   echo "$ac_t""no" 1>&6
  2840. fi
  2841. done
  2842.  
  2843. for ac_func in rint aint floor ceil isnan tcsetattr cfmakeraw
  2844. do
  2845. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2846. echo "configure:2847: checking for $ac_func" >&5
  2847. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2848.   echo $ac_n "(cached) $ac_c" 1>&6
  2849. else
  2850.   cat > conftest.$ac_ext <<EOF
  2851. #line 2852 "configure"
  2852. #include "confdefs.h"
  2853. /* System header to define __stub macros and hopefully few prototypes,
  2854.     which can conflict with char $ac_func(); below.  */
  2855. #include <assert.h>
  2856. /* Override any gcc2 internal prototype to avoid an error.  */
  2857. /* We use char because int might match the return type of a gcc2
  2858.     builtin and then its argument prototype would still apply.  */
  2859. char $ac_func();
  2860.  
  2861. int main() {
  2862.  
  2863. /* The GNU C library defines this for functions which it implements
  2864.     to always fail with ENOSYS.  Some functions are actually named
  2865.     something starting with __ and the normal name is an alias.  */
  2866. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2867. choke me
  2868. #else
  2869. $ac_func();
  2870. #endif
  2871.  
  2872. ; return 0; }
  2873. EOF
  2874. if { (eval echo configure:2875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2875.   rm -rf conftest*
  2876.   eval "ac_cv_func_$ac_func=yes"
  2877. else
  2878.   echo "configure: failed program was:" >&5
  2879.   cat conftest.$ac_ext >&5
  2880.   rm -rf conftest*
  2881.   eval "ac_cv_func_$ac_func=no"
  2882. fi
  2883. rm -f conftest*
  2884. fi
  2885.  
  2886. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2887.   echo "$ac_t""yes" 1>&6
  2888.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2889.   cat >> confdefs.h <<EOF
  2890. #define $ac_tr_func 1
  2891. EOF
  2892.  
  2893. else
  2894.   echo "$ac_t""no" 1>&6
  2895. fi
  2896. done
  2897.  
  2898. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  2899. echo "configure:2900: checking whether time.h and sys/time.h may both be included" >&5
  2900. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  2901.   echo $ac_n "(cached) $ac_c" 1>&6
  2902. else
  2903.   cat > conftest.$ac_ext <<EOF
  2904. #line 2905 "configure"
  2905. #include "confdefs.h"
  2906. #include <sys/types.h>
  2907. #include <sys/time.h>
  2908. #include <time.h>
  2909. int main() {
  2910. struct tm *tp;
  2911. ; return 0; }
  2912. EOF
  2913. if { (eval echo configure:2914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2914.   rm -rf conftest*
  2915.   ac_cv_header_time=yes
  2916. else
  2917.   echo "configure: failed program was:" >&5
  2918.   cat conftest.$ac_ext >&5
  2919.   rm -rf conftest*
  2920.   ac_cv_header_time=no
  2921. fi
  2922. rm -f conftest*
  2923. fi
  2924.  
  2925. echo "$ac_t""$ac_cv_header_time" 1>&6
  2926. if test $ac_cv_header_time = yes; then
  2927.   cat >> confdefs.h <<\EOF
  2928. #define TIME_WITH_SYS_TIME 1
  2929. EOF
  2930.  
  2931. fi
  2932.  
  2933. ac_header_dirent=no
  2934. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  2935. do
  2936. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2937. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
  2938. echo "configure:2939: checking for $ac_hdr that defines DIR" >&5
  2939. if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  2940.   echo $ac_n "(cached) $ac_c" 1>&6
  2941. else
  2942.   cat > conftest.$ac_ext <<EOF
  2943. #line 2944 "configure"
  2944. #include "confdefs.h"
  2945. #include <sys/types.h>
  2946. #include <$ac_hdr>
  2947. int main() {
  2948. DIR *dirp = 0;
  2949. ; return 0; }
  2950. EOF
  2951. if { (eval echo configure:2952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2952.   rm -rf conftest*
  2953.   eval "ac_cv_header_dirent_$ac_safe=yes"
  2954. else
  2955.   echo "configure: failed program was:" >&5
  2956.   cat conftest.$ac_ext >&5
  2957.   rm -rf conftest*
  2958.   eval "ac_cv_header_dirent_$ac_safe=no"
  2959. fi
  2960. rm -f conftest*
  2961. fi
  2962. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  2963.   echo "$ac_t""yes" 1>&6
  2964.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2965.   cat >> confdefs.h <<EOF
  2966. #define $ac_tr_hdr 1
  2967. EOF
  2968.  ac_header_dirent=$ac_hdr; break
  2969. else
  2970.   echo "$ac_t""no" 1>&6
  2971. fi
  2972. done
  2973. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  2974. if test $ac_header_dirent = dirent.h; then
  2975. echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
  2976. echo "configure:2977: checking for opendir in -ldir" >&5
  2977. ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
  2978. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2979.   echo $ac_n "(cached) $ac_c" 1>&6
  2980. else
  2981.   ac_save_LIBS="$LIBS"
  2982. LIBS="-ldir  $LIBS"
  2983. cat > conftest.$ac_ext <<EOF
  2984. #line 2985 "configure"
  2985. #include "confdefs.h"
  2986. /* Override any gcc2 internal prototype to avoid an error.  */
  2987. /* We use char because int might match the return type of a gcc2
  2988.     builtin and then its argument prototype would still apply.  */
  2989. char opendir();
  2990.  
  2991. int main() {
  2992. opendir()
  2993. ; return 0; }
  2994. EOF
  2995. if { (eval echo configure:2996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2996.   rm -rf conftest*
  2997.   eval "ac_cv_lib_$ac_lib_var=yes"
  2998. else
  2999.   echo "configure: failed program was:" >&5
  3000.   cat conftest.$ac_ext >&5
  3001.   rm -rf conftest*
  3002.   eval "ac_cv_lib_$ac_lib_var=no"
  3003. fi
  3004. rm -f conftest*
  3005. LIBS="$ac_save_LIBS"
  3006.  
  3007. fi
  3008. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3009.   echo "$ac_t""yes" 1>&6
  3010.   LIBS="$LIBS -ldir"
  3011. else
  3012.   echo "$ac_t""no" 1>&6
  3013. fi
  3014.  
  3015. else
  3016. echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
  3017. echo "configure:3018: checking for opendir in -lx" >&5
  3018. ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
  3019. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3020.   echo $ac_n "(cached) $ac_c" 1>&6
  3021. else
  3022.   ac_save_LIBS="$LIBS"
  3023. LIBS="-lx  $LIBS"
  3024. cat > conftest.$ac_ext <<EOF
  3025. #line 3026 "configure"
  3026. #include "confdefs.h"
  3027. /* Override any gcc2 internal prototype to avoid an error.  */
  3028. /* We use char because int might match the return type of a gcc2
  3029.     builtin and then its argument prototype would still apply.  */
  3030. char opendir();
  3031.  
  3032. int main() {
  3033. opendir()
  3034. ; return 0; }
  3035. EOF
  3036. if { (eval echo configure:3037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3037.   rm -rf conftest*
  3038.   eval "ac_cv_lib_$ac_lib_var=yes"
  3039. else
  3040.   echo "configure: failed program was:" >&5
  3041.   cat conftest.$ac_ext >&5
  3042.   rm -rf conftest*
  3043.   eval "ac_cv_lib_$ac_lib_var=no"
  3044. fi
  3045. rm -f conftest*
  3046. LIBS="$ac_save_LIBS"
  3047.  
  3048. fi
  3049. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3050.   echo "$ac_t""yes" 1>&6
  3051.   LIBS="$LIBS -lx"
  3052. else
  3053.   echo "$ac_t""no" 1>&6
  3054. fi
  3055.  
  3056. fi
  3057.  
  3058. echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
  3059. echo "configure:3060: checking for sys/wait.h that is POSIX.1 compatible" >&5
  3060. if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
  3061.   echo $ac_n "(cached) $ac_c" 1>&6
  3062. else
  3063.   cat > conftest.$ac_ext <<EOF
  3064. #line 3065 "configure"
  3065. #include "confdefs.h"
  3066. #include <sys/types.h>
  3067. #include <sys/wait.h>
  3068. #ifndef WEXITSTATUS
  3069. #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
  3070. #endif
  3071. #ifndef WIFEXITED
  3072. #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
  3073. #endif
  3074. int main() {
  3075. int s;
  3076. wait (&s);
  3077. s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  3078. ; return 0; }
  3079. EOF
  3080. if { (eval echo configure:3081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3081.   rm -rf conftest*
  3082.   ac_cv_header_sys_wait_h=yes
  3083. else
  3084.   echo "configure: failed program was:" >&5
  3085.   cat conftest.$ac_ext >&5
  3086.   rm -rf conftest*
  3087.   ac_cv_header_sys_wait_h=no
  3088. fi
  3089. rm -f conftest*
  3090. fi
  3091.  
  3092. echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
  3093. if test $ac_cv_header_sys_wait_h = yes; then
  3094.   cat >> confdefs.h <<\EOF
  3095. #define HAVE_SYS_WAIT_H 1
  3096. EOF
  3097.  
  3098. fi
  3099.  
  3100. echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  3101. echo "configure:3102: checking for pid_t" >&5
  3102. if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  3103.   echo $ac_n "(cached) $ac_c" 1>&6
  3104. else
  3105.   cat > conftest.$ac_ext <<EOF
  3106. #line 3107 "configure"
  3107. #include "confdefs.h"
  3108. #include <sys/types.h>
  3109. #if STDC_HEADERS
  3110. #include <stdlib.h>
  3111. #include <stddef.h>
  3112. #endif
  3113. EOF
  3114. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3115.   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  3116.   rm -rf conftest*
  3117.   ac_cv_type_pid_t=yes
  3118. else
  3119.   rm -rf conftest*
  3120.   ac_cv_type_pid_t=no
  3121. fi
  3122. rm -f conftest*
  3123.  
  3124. fi
  3125. echo "$ac_t""$ac_cv_type_pid_t" 1>&6
  3126. if test $ac_cv_type_pid_t = no; then
  3127.   cat >> confdefs.h <<\EOF
  3128. #define pid_t int
  3129. EOF
  3130.  
  3131. fi
  3132.  
  3133. ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
  3134. echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
  3135. echo "configure:3136: checking for vfork.h" >&5
  3136. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3137.   echo $ac_n "(cached) $ac_c" 1>&6
  3138. else
  3139.   cat > conftest.$ac_ext <<EOF
  3140. #line 3141 "configure"
  3141. #include "confdefs.h"
  3142. #include <vfork.h>
  3143. EOF
  3144. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3145. { (eval echo configure:3146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3146. ac_err=`grep -v '^ *+' conftest.out`
  3147. if test -z "$ac_err"; then
  3148.   rm -rf conftest*
  3149.   eval "ac_cv_header_$ac_safe=yes"
  3150. else
  3151.   echo "$ac_err" >&5
  3152.   echo "configure: failed program was:" >&5
  3153.   cat conftest.$ac_ext >&5
  3154.   rm -rf conftest*
  3155.   eval "ac_cv_header_$ac_safe=no"
  3156. fi
  3157. rm -f conftest*
  3158. fi
  3159. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3160.   echo "$ac_t""yes" 1>&6
  3161.   cat >> confdefs.h <<\EOF
  3162. #define HAVE_VFORK_H 1
  3163. EOF
  3164.  
  3165. else
  3166.   echo "$ac_t""no" 1>&6
  3167. fi
  3168.  
  3169. echo $ac_n "checking for working vfork""... $ac_c" 1>&6
  3170. echo "configure:3171: checking for working vfork" >&5
  3171. if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
  3172.   echo $ac_n "(cached) $ac_c" 1>&6
  3173. else
  3174.   if test "$cross_compiling" = yes; then
  3175.   echo $ac_n "checking for vfork""... $ac_c" 1>&6
  3176. echo "configure:3177: checking for vfork" >&5
  3177. if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
  3178.   echo $ac_n "(cached) $ac_c" 1>&6
  3179. else
  3180.   cat > conftest.$ac_ext <<EOF
  3181. #line 3182 "configure"
  3182. #include "confdefs.h"
  3183. /* System header to define __stub macros and hopefully few prototypes,
  3184.     which can conflict with char vfork(); below.  */
  3185. #include <assert.h>
  3186. /* Override any gcc2 internal prototype to avoid an error.  */
  3187. /* We use char because int might match the return type of a gcc2
  3188.     builtin and then its argument prototype would still apply.  */
  3189. char vfork();
  3190.  
  3191. int main() {
  3192.  
  3193. /* The GNU C library defines this for functions which it implements
  3194.     to always fail with ENOSYS.  Some functions are actually named
  3195.     something starting with __ and the normal name is an alias.  */
  3196. #if defined (__stub_vfork) || defined (__stub___vfork)
  3197. choke me
  3198. #else
  3199. vfork();
  3200. #endif
  3201.  
  3202. ; return 0; }
  3203. EOF
  3204. if { (eval echo configure:3205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3205.   rm -rf conftest*
  3206.   eval "ac_cv_func_vfork=yes"
  3207. else
  3208.   echo "configure: failed program was:" >&5
  3209.   cat conftest.$ac_ext >&5
  3210.   rm -rf conftest*
  3211.   eval "ac_cv_func_vfork=no"
  3212. fi
  3213. rm -f conftest*
  3214. fi
  3215.  
  3216. if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
  3217.   echo "$ac_t""yes" 1>&6
  3218.   :
  3219. else
  3220.   echo "$ac_t""no" 1>&6
  3221. fi
  3222.  
  3223. else
  3224.   cat > conftest.$ac_ext <<EOF
  3225. #line 3226 "configure"
  3226. #include "confdefs.h"
  3227. /* Thanks to Paul Eggert for this test.  */
  3228. #include <stdio.h>
  3229. #include <sys/types.h>
  3230. #include <sys/stat.h>
  3231. #ifdef HAVE_UNISTD_H
  3232. #include <unistd.h>
  3233. #endif
  3234. #ifdef HAVE_VFORK_H
  3235. #include <vfork.h>
  3236. #endif
  3237. /* On some sparc systems, changes by the child to local and incoming
  3238.    argument registers are propagated back to the parent.
  3239.    The compiler is told about this with #include <vfork.h>,
  3240.    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
  3241.    Test for this by using a static variable whose address
  3242.    is put into a register that is clobbered by the vfork.  */
  3243. static
  3244. #ifdef __cplusplus
  3245. sparc_address_test (int arg)
  3246. #else
  3247. sparc_address_test (arg) int arg;
  3248. #endif
  3249. {
  3250.   static pid_t child;
  3251.   if (!child) {
  3252.     child = vfork ();
  3253.     if (child < 0) {
  3254.       perror ("vfork");
  3255.       _exit(2);
  3256.     }
  3257.     if (!child) {
  3258.       arg = getpid();
  3259.       write(-1, "", 0);
  3260.       _exit (arg);
  3261.     }
  3262.   }
  3263. }
  3264. main() {
  3265.   pid_t parent = getpid ();
  3266.   pid_t child;
  3267.  
  3268.   sparc_address_test ();
  3269.  
  3270.   child = vfork ();
  3271.  
  3272.   if (child == 0) {
  3273.     /* Here is another test for sparc vfork register problems.
  3274.        This test uses lots of local variables, at least
  3275.        as many local variables as main has allocated so far
  3276.        including compiler temporaries.  4 locals are enough for
  3277.        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
  3278.        A buggy compiler should reuse the register of parent
  3279.        for one of the local variables, since it will think that
  3280.        parent can't possibly be used any more in this routine.
  3281.        Assigning to the local variable will thus munge parent
  3282.        in the parent process.  */
  3283.     pid_t
  3284.       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
  3285.       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
  3286.     /* Convince the compiler that p..p7 are live; otherwise, it might
  3287.        use the same hardware register for all 8 local variables.  */
  3288.     if (p != p1 || p != p2 || p != p3 || p != p4
  3289.     || p != p5 || p != p6 || p != p7)
  3290.       _exit(1);
  3291.  
  3292.     /* On some systems (e.g. IRIX 3.3),
  3293.        vfork doesn't separate parent from child file descriptors.
  3294.        If the child closes a descriptor before it execs or exits,
  3295.        this munges the parent's descriptor as well.
  3296.        Test for this by closing stdout in the child.  */
  3297.     _exit(close(fileno(stdout)) != 0);
  3298.   } else {
  3299.     int status;
  3300.     struct stat st;
  3301.  
  3302.     while (wait(&status) != child)
  3303.       ;
  3304.     exit(
  3305.      /* Was there some problem with vforking?  */
  3306.      child < 0
  3307.  
  3308.      /* Did the child fail?  (This shouldn't happen.)  */
  3309.      || status
  3310.  
  3311.      /* Did the vfork/compiler bug occur?  */
  3312.      || parent != getpid()
  3313.  
  3314.      /* Did the file descriptor bug occur?  */
  3315.      || fstat(fileno(stdout), &st) != 0
  3316.      );
  3317.   }
  3318. }
  3319. EOF
  3320. if { (eval echo configure:3321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  3321. then
  3322.   ac_cv_func_vfork_works=yes
  3323. else
  3324.   echo "configure: failed program was:" >&5
  3325.   cat conftest.$ac_ext >&5
  3326.   rm -fr conftest*
  3327.   ac_cv_func_vfork_works=no
  3328. fi
  3329. rm -fr conftest*
  3330. fi
  3331.  
  3332. fi
  3333.  
  3334. echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
  3335. if test $ac_cv_func_vfork_works = no; then
  3336.   cat >> confdefs.h <<\EOF
  3337. #define vfork fork
  3338. EOF
  3339.  
  3340. fi
  3341.  
  3342.  
  3343. echo $ac_n "checking "alignment restrictions on doubles"""... $ac_c" 1>&6
  3344. echo "configure:3345: checking "alignment restrictions on doubles"" >&5
  3345. if test "$cross_compiling" = yes; then
  3346.   echo "$ac_t""assuming sizeof(double)" 1>&6
  3347. cat >> confdefs.h <<\EOF
  3348. #define DOUBLE_ALIGNMENT sizeof(double)
  3349. EOF
  3350.  
  3351. else
  3352.   cat > conftest.$ac_ext <<EOF
  3353. #line 3354 "configure"
  3354. #include "confdefs.h"
  3355.  main()
  3356.   { long l[10];
  3357.     double *p;
  3358.     unsigned long x = (unsigned long) l;
  3359.  
  3360.     if ( x % sizeof(double) == 0 )
  3361.       x += sizeof(long);
  3362.     p = (double  *) x;
  3363.     *p = 1.0;
  3364.  
  3365.     exit(0);
  3366.   }
  3367.  
  3368. EOF
  3369. if { (eval echo configure:3370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  3370. then
  3371.   echo "$ac_t""as long" 1>&6
  3372. else
  3373.   echo "configure: failed program was:" >&5
  3374.   cat conftest.$ac_ext >&5
  3375.   rm -fr conftest*
  3376.   echo "$ac_t""sizeof(double)" 1>&6
  3377. cat >> confdefs.h <<\EOF
  3378. #define DOUBLE_ALIGNMENT sizeof(double)
  3379. EOF
  3380.  
  3381. fi
  3382. rm -fr conftest*
  3383. fi
  3384.  
  3385.  
  3386. if test "$ac_cv_func_getrlimit" = "yes"; then
  3387. echo $ac_n "checking "type rlim_t"""... $ac_c" 1>&6
  3388. echo "configure:3389: checking "type rlim_t"" >&5
  3389. cat > conftest.$ac_ext <<EOF
  3390. #line 3391 "configure"
  3391. #include "confdefs.h"
  3392.  
  3393. #include <sys/types.h>
  3394. #include <sys/resource.h>
  3395.  
  3396. int main() {
  3397.  rlim_t datasize;
  3398.  
  3399. ; return 0; }
  3400. EOF
  3401. if { (eval echo configure:3402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3402.   rm -rf conftest*
  3403.   cat >> confdefs.h <<\EOF
  3404. #define HAVE_RLIM_T 1
  3405. EOF
  3406.  
  3407.    echo "$ac_t""yes" 1>&6
  3408. else
  3409.   echo "configure: failed program was:" >&5
  3410.   cat conftest.$ac_ext >&5
  3411.   rm -rf conftest*
  3412.   echo "$ac_t""no" 1>&6
  3413. fi
  3414. rm -f conftest*
  3415. fi
  3416.  
  3417. echo $ac_n "checking "whether assert.h needs stdio.h"""... $ac_c" 1>&6
  3418. echo "configure:3419: checking "whether assert.h needs stdio.h"" >&5
  3419. cat > conftest.$ac_ext <<EOF
  3420. #line 3421 "configure"
  3421. #include "confdefs.h"
  3422.  
  3423. #include <assert.h>
  3424.  
  3425. int main() {
  3426.  assert(1);
  3427.  
  3428. ; return 0; }
  3429. EOF
  3430. if { (eval echo configure:3431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3431.   rm -rf conftest*
  3432.   echo "$ac_t""no" 1>&6
  3433. else
  3434.   echo "configure: failed program was:" >&5
  3435.   cat conftest.$ac_ext >&5
  3436.   rm -rf conftest*
  3437.   echo "$ac_t""yes" 1>&6;
  3438.    cat >> confdefs.h <<\EOF
  3439. #define ASSERT_H_REQUIRES_STDIO_H 1
  3440. EOF
  3441.  
  3442. fi
  3443. rm -f conftest*
  3444.  
  3445. echo "checking "for including sys/ioctl.h after sys/termios.h"" 1>&6
  3446. echo "configure:3447: checking "for including sys/ioctl.h after sys/termios.h"" >&5
  3447. if test "$GCC" = "yes"; then
  3448.     ac_oldcflags="$CFLAGS"
  3449.     CFLAGS="$CFLAGS -Werror"
  3450. fi
  3451. cat > conftest.$ac_ext <<EOF
  3452. #line 3453 "configure"
  3453. #include "confdefs.h"
  3454.  
  3455. #include <stdio.h>
  3456. #include <sys/types.h>
  3457. #include <sys/termios.h>
  3458. #include <sys/ioctl.h> 
  3459.  
  3460. int main() {
  3461. ;
  3462.  
  3463. ; return 0; }
  3464. EOF
  3465. if { (eval echo configure:3466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3466.   rm -rf conftest*
  3467.   true
  3468. else
  3469.   echo "configure: failed program was:" >&5
  3470.   cat conftest.$ac_ext >&5
  3471.   rm -rf conftest*
  3472.   cat >> confdefs.h <<\EOF
  3473. #define NO_SYS_IOCTL_H_WITH_SYS_TERMIOS_H 1
  3474. EOF
  3475.  
  3476. fi
  3477. rm -f conftest*
  3478. if test "$GCC" = "yes"; then CFLAGS="$ac_oldcflags"; fi
  3479.  
  3480. if test -z "$ac_cv_header_sys_termio_h" -a -z "$ac_cv_header_sys_termios_h"; then
  3481. echo $ac_n "checking "struct sgttyb"""... $ac_c" 1>&6
  3482. echo "configure:3483: checking "struct sgttyb"" >&5
  3483. cat > conftest.$ac_ext <<EOF
  3484. #line 3485 "configure"
  3485. #include "confdefs.h"
  3486.  
  3487. #include <sys/types.h>
  3488. #include <sys/ioctl.h>
  3489.  
  3490. int main() {
  3491.  struct sgttyb buf;
  3492.   ;
  3493.  
  3494. ; return 0; }
  3495. EOF
  3496. if { (eval echo configure:3497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3497.   rm -rf conftest*
  3498.   cat >> confdefs.h <<\EOF
  3499. #define HAVE_SGTTYB 1
  3500. EOF
  3501.  
  3502.    echo "$ac_t""yes" 1>&6
  3503. else
  3504.   echo "configure: failed program was:" >&5
  3505.   cat conftest.$ac_ext >&5
  3506.   rm -rf conftest*
  3507.   echo "$ac_t""no" 1>&6
  3508. fi
  3509. rm -f conftest*
  3510. fi
  3511.  
  3512.  
  3513. echo $ac_n "checking "for type uchar"""... $ac_c" 1>&6
  3514. echo "configure:3515: checking "for type uchar"" >&5
  3515. cat > conftest.$ac_ext <<EOF
  3516. #line 3517 "configure"
  3517. #include "confdefs.h"
  3518.  
  3519. #include <sys/types.h>
  3520. typedef unsigned char uchar;
  3521.  
  3522. int main() {
  3523. ;
  3524. ; return 0; }
  3525. EOF
  3526. if { (eval echo configure:3527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3527.   rm -rf conftest*
  3528.   cat >> confdefs.h <<\EOF
  3529. #define NEED_UCHAR 1
  3530. EOF
  3531.  
  3532.      echo "$ac_t"""need typedef uchar"" 1>&6
  3533. else
  3534.   echo "configure: failed program was:" >&5
  3535.   cat conftest.$ac_ext >&5
  3536.   rm -rf conftest*
  3537.   echo "$ac_t"""uchar predefined"" 1>&6
  3538. fi
  3539. rm -f conftest*
  3540.  
  3541. echo $ac_n "checking "whether we need extern int errno"""... $ac_c" 1>&6
  3542. echo "configure:3543: checking "whether we need extern int errno"" >&5
  3543. cat > conftest.$ac_ext <<EOF
  3544. #line 3545 "configure"
  3545. #include "confdefs.h"
  3546.  
  3547. #include <sys/types.h>
  3548. #include <stdio.h>
  3549. #include <errno.h>
  3550.  
  3551. int main() {
  3552.  return errno;
  3553.  
  3554. ; return 0; }
  3555. EOF
  3556. if { (eval echo configure:3557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3557.   rm -rf conftest*
  3558.   echo "$ac_t""no" 1>&6
  3559. else
  3560.   echo "configure: failed program was:" >&5
  3561.   cat conftest.$ac_ext >&5
  3562.   rm -rf conftest*
  3563.   cat >> confdefs.h <<\EOF
  3564. #define NEED_DECL_ERRNO 1
  3565. EOF
  3566.  
  3567.    echo "$ac_t""yes" 1>&6
  3568. fi
  3569. rm -f conftest*
  3570.  
  3571. echo $ac_n "checking "for symbolic links"""... $ac_c" 1>&6
  3572. echo "configure:3573: checking "for symbolic links"" >&5
  3573. if touch conftest.x && ln -s conftest.x conftest.lns && cmp conftest.x conftest.lns; then
  3574.     cat >> confdefs.h <<\EOF
  3575. #define HAVE_SYMLINKS 1
  3576. EOF
  3577.  
  3578.     echo "$ac_t""yes" 1>&6
  3579. else
  3580.     echo "$ac_t""no" 1>&6
  3581. fi
  3582.  
  3583. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  3584. echo "configure:3585: checking return type of signal handlers" >&5
  3585. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  3586.   echo $ac_n "(cached) $ac_c" 1>&6
  3587. else
  3588.   cat > conftest.$ac_ext <<EOF
  3589. #line 3590 "configure"
  3590. #include "confdefs.h"
  3591. #include <sys/types.h>
  3592. #include <signal.h>
  3593. #ifdef signal
  3594. #undef signal
  3595. #endif
  3596. #ifdef __cplusplus
  3597. extern "C" void (*signal (int, void (*)(int)))(int);
  3598. #else
  3599. void (*signal ()) ();
  3600. #endif
  3601.  
  3602. int main() {
  3603. int i;
  3604. ; return 0; }
  3605. EOF
  3606. if { (eval echo configure:3607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3607.   rm -rf conftest*
  3608.   ac_cv_type_signal=void
  3609. else
  3610.   echo "configure: failed program was:" >&5
  3611.   cat conftest.$ac_ext >&5
  3612.   rm -rf conftest*
  3613.   ac_cv_type_signal=int
  3614. fi
  3615. rm -f conftest*
  3616. fi
  3617.  
  3618. echo "$ac_t""$ac_cv_type_signal" 1>&6
  3619. cat >> confdefs.h <<EOF
  3620. #define RETSIGTYPE $ac_cv_type_signal
  3621. EOF
  3622.  
  3623.  
  3624. echo $ac_n "checking "for BSD signal handlers"""... $ac_c" 1>&6
  3625. echo "configure:3626: checking "for BSD signal handlers"" >&5
  3626. if test "$cross_compiling" = yes; then
  3627.   echo "$ac_t"""assuming Posix signals"" 1>&6
  3628. else
  3629.   cat > conftest.$ac_ext <<EOF
  3630. #line 3631 "configure"
  3631. #include "confdefs.h"
  3632.  
  3633. #include <stdio.h>
  3634. #include <sys/types.h>
  3635. #include <sys/stat.h>
  3636. #include <signal.h>
  3637. #ifdef HAVE_UNISTD_H
  3638. #include <unistd.h>
  3639. #endif
  3640. static int signalled;
  3641. static RETSIGTYPE catch (s) int s; { signalled = 1; }
  3642. main()
  3643. { signal(SIGINT, catch);
  3644.   kill(getpid(), SIGINT);
  3645.   while(!signalled)
  3646.     ;
  3647.   if ( signal(SIGINT, catch) == catch )
  3648.     exit(0);
  3649.   exit(1);
  3650. }
  3651. EOF
  3652. if { (eval echo configure:3653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  3653. then
  3654.   cat >> confdefs.h <<\EOF
  3655. #define BSD_SIGNALS 1
  3656. EOF
  3657.  
  3658.     echo "$ac_t"""BSD signals"" 1>&6
  3659. else
  3660.   echo "configure: failed program was:" >&5
  3661.   cat conftest.$ac_ext >&5
  3662.   rm -fr conftest*
  3663.   echo "$ac_t"""Posix signals"" 1>&6
  3664. fi
  3665. rm -fr conftest*
  3666. fi
  3667.  
  3668.  
  3669. echo $ac_n "checking "for SIGPROF profiler support"""... $ac_c" 1>&6
  3670. echo "configure:3671: checking "for SIGPROF profiler support"" >&5
  3671. if test "$cross_compiling" = yes; then
  3672.   true
  3673. else
  3674.   cat > conftest.$ac_ext <<EOF
  3675. #line 3676 "configure"
  3676. #include "confdefs.h"
  3677.  
  3678. #ifdef TIME_WITH_SYS_TIME
  3679. #include <sys/time.h>
  3680. #include <time.h>
  3681. #else
  3682. #ifdef HAVE_SYS_TIME_H
  3683. #include <sys/time.h>
  3684. #else
  3685. #include <time.h>
  3686. #endif
  3687. #endif
  3688. #include <signal.h>
  3689. static RETSIGTYPE prof(s) int s; {exit(0);}
  3690. main()
  3691. { struct itimerval value, ovalue;
  3692.   int n;
  3693.   value.it_interval.tv_sec  = 0;
  3694.   value.it_interval.tv_usec = 1;
  3695.   value.it_value.tv_sec  = 0;
  3696.   value.it_value.tv_usec = 1;
  3697.   
  3698.   signal(SIGPROF, prof);
  3699.  
  3700.   if (setitimer(ITIMER_PROF, &value, &ovalue) != 0)
  3701.     exit(1);
  3702.  
  3703.   for(n=0; n<10000000; n++)
  3704.     ;
  3705.   exit(1);
  3706. }
  3707. EOF
  3708. if { (eval echo configure:3709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  3709. then
  3710.   cat >> confdefs.h <<\EOF
  3711. #define O_PROFILE 1
  3712. EOF
  3713.  
  3714.     echo "$ac_t""yes" 1>&6
  3715. else
  3716.   echo "configure: failed program was:" >&5
  3717.   cat conftest.$ac_ext >&5
  3718.   rm -fr conftest*
  3719.   echo "$ac_t""no" 1>&6
  3720. fi
  3721. rm -fr conftest*
  3722. fi
  3723.  
  3724.  
  3725. echo $ac_n "checking "for union wait"""... $ac_c" 1>&6
  3726. echo "configure:3727: checking "for union wait"" >&5
  3727. if test "$GCC" = yes; then
  3728.     ac_oldcflags="$CFLAGS"
  3729.     CFLAGS="$CFLAGS -Werror"
  3730. fi
  3731. cat > conftest.$ac_ext <<EOF
  3732. #line 3733 "configure"
  3733. #include "confdefs.h"
  3734.  
  3735. #include <sys/wait.h>
  3736.  
  3737. int main() {
  3738.  union wait status;
  3739.   waitpid(1, &status, WNOHANG);
  3740.  
  3741. ; return 0; }
  3742. EOF
  3743. if { (eval echo configure:3744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3744.   rm -rf conftest*
  3745.   cat >> confdefs.h <<\EOF
  3746. #define UNION_WAIT 1
  3747. EOF
  3748.  
  3749.    echo "$ac_t""yes" 1>&6
  3750. else
  3751.   echo "configure: failed program was:" >&5
  3752.   cat conftest.$ac_ext >&5
  3753.   rm -rf conftest*
  3754.   echo "$ac_t""no" 1>&6
  3755. fi
  3756. rm -f conftest*
  3757. if test "$GCC" = "yes"; then CFLAGS="$ac_oldcflags"; fi
  3758.  
  3759. echo $ac_n "checking "for tagged lvalues"""... $ac_c" 1>&6
  3760. echo "configure:3761: checking "for tagged lvalues"" >&5
  3761. cat > conftest.$ac_ext <<EOF
  3762. #line 3763 "configure"
  3763. #include "confdefs.h"
  3764.  
  3765.  
  3766. int main() {
  3767.  int x;
  3768.   *(char *)&x = 'a';
  3769.   exit(0);
  3770.  
  3771. ; return 0; }
  3772. EOF
  3773. if { (eval echo configure:3774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3774.   rm -rf conftest*
  3775.   cat >> confdefs.h <<\EOF
  3776. #define TAGGED_LVALUE 1
  3777. EOF
  3778.  
  3779.    echo "$ac_t""yes" 1>&6
  3780. else
  3781.   echo "configure: failed program was:" >&5
  3782.   cat conftest.$ac_ext >&5
  3783.   rm -rf conftest*
  3784.   echo "$ac_t""no" 1>&6
  3785. fi
  3786. rm -f conftest*
  3787.  
  3788.  
  3789.  
  3790. echo $ac_n "checking "memory model"""... $ac_c" 1>&6
  3791. echo "configure:3792: checking "memory model"" >&5;
  3792. echo '#include "confdefs.h"' > conftest.c
  3793. cat $srcdir/test/memmodel.c >> conftest.c
  3794. (eval $ac_link) 2>&5
  3795. if test -s conftest && eval `./conftest`; then
  3796.     cat >> confdefs.h <<EOF
  3797. #define STACK_DIRECTION $STACK_DIRECTION
  3798. EOF
  3799.  
  3800.     echo "$ac_t""yes" 1>&6
  3801. else
  3802.     echo "configure: warning: "Failed to compile test/memmodel.c"" 1>&2
  3803. fi
  3804. rm -fr conftest*
  3805.  
  3806.  
  3807. echo $ac_n "checking "for nop"""... $ac_c" 1>&6
  3808. echo "configure:3809: checking "for nop"" >&5;
  3809. echo '#include "confdefs.h"' > conftest.c
  3810. cat $srcdir/test/nop.c >> conftest.c
  3811. (eval $ac_link) 2>&5
  3812. if test -s conftest && eval `./conftest`; then
  3813.     echo "$ac_t""yes" 1>&6
  3814. else
  3815.     cat >> confdefs.h <<\EOF
  3816. #define NO_ASM_NOP 1
  3817. EOF
  3818.  
  3819.     echo "$ac_t""no" 1>&6
  3820. fi
  3821. rm -fr conftest*
  3822.  
  3823.  
  3824.  
  3825. echo $ac_n "checking "if we can use mmap for stack allocation"""... $ac_c" 1>&6
  3826. echo "configure:3827: checking "if we can use mmap for stack allocation"" >&5
  3827. echo '#include "confdefs.h"' > conftest.c
  3828. cat $srcdir/test/mmap.c >> conftest.c
  3829. (eval $ac_link) 2>&5
  3830. if test -s conftest && eval `./conftest`; then
  3831.     if test "$MMAP_STACK" = "1"; then
  3832.         if test "$HAVE_MAP_ANON" = "1"; then
  3833.         cat >> confdefs.h <<\EOF
  3834. #define HAVE_MAP_ANON 1
  3835. EOF
  3836.  
  3837.         echo "$ac_t"""Using MAP_ANON"" 1>&6
  3838.     else
  3839.         echo "$ac_t"""Using MAP_PRIVATE"" 1>&6
  3840.     fi
  3841.         cat >> confdefs.h <<\EOF
  3842. #define MMAP_STACK 1
  3843. EOF
  3844.  
  3845.     else
  3846.     echo "$ac_t"""mmap is not good enough"" 1>&6
  3847.     fi
  3848.     if test ! -z "$MMAP_MIN_ADDRESS"; then
  3849.     cat >> confdefs.h <<EOF
  3850. #define MMAP_MIN_ADDRESS $MMAP_MIN_ADDRESS
  3851. EOF
  3852.  
  3853.     fi
  3854.     if test ! -z "$MMAP_MAX_ADDRESS"; then
  3855.     cat >> confdefs.h <<EOF
  3856. #define MMAP_MAX_ADDRESS $MMAP_MAX_ADDRESS
  3857. EOF
  3858.  
  3859.     fi
  3860.     if test "$SIGNAL_HANDLER_PROVIDES_ADDRESS" = "1"; then
  3861.     cat >> confdefs.h <<\EOF
  3862. #define SIGNAL_HANDLER_PROVIDES_ADDRESS 1
  3863. EOF
  3864.  
  3865.     fi
  3866.     if test ! -z "$TOPOFHEAP"; then
  3867.     cat >> confdefs.h <<EOF
  3868. #define TOPOFHEAP $TOPOFHEAP
  3869. EOF
  3870.  
  3871.     fi
  3872. else
  3873.     echo "$ac_t"""could not compile mmap test"" 1>&6;
  3874. fi
  3875. rm -fr conftest*
  3876.  
  3877. if test "$configsave" = "yes"; then
  3878.  
  3879.  
  3880. echo $ac_n "checking "_data_start"""... $ac_c" 1>&6
  3881. echo "configure:3882: checking "_data_start"" >&5
  3882. cat > conftest.$ac_ext <<EOF
  3883. #line 3884 "configure"
  3884. #include "confdefs.h"
  3885. extern int _data_start;
  3886. int main() {
  3887.  { int *x = &_data_start; }
  3888.         
  3889. ; return 0; }
  3890. EOF
  3891. if { (eval echo configure:3892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3892.   rm -rf conftest*
  3893.   cat >> confdefs.h <<\EOF
  3894. #define FIRST_DATA_SYMBOL _data_start
  3895. EOF
  3896.  
  3897.         echo "$ac_t""yes" 1>&6
  3898. else
  3899.   echo "configure: failed program was:" >&5
  3900.   cat conftest.$ac_ext >&5
  3901.   rm -rf conftest*
  3902.   echo "$ac_t""no" 1>&6
  3903. fi
  3904. rm -f conftest*
  3905. echo $ac_n "checking "_data"""... $ac_c" 1>&6
  3906. echo "configure:3907: checking "_data"" >&5
  3907. cat > conftest.$ac_ext <<EOF
  3908. #line 3909 "configure"
  3909. #include "confdefs.h"
  3910. extern int _data;
  3911. int main() {
  3912.  { int *x = &_data; }
  3913.         
  3914. ; return 0; }
  3915. EOF
  3916. if { (eval echo configure:3917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3917.   rm -rf conftest*
  3918.   cat >> confdefs.h <<\EOF
  3919. #define FIRST_DATA_SYMBOL _data
  3920. EOF
  3921.  
  3922.         echo "$ac_t""yes" 1>&6
  3923. else
  3924.   echo "configure: failed program was:" >&5
  3925.   cat conftest.$ac_ext >&5
  3926.   rm -rf conftest*
  3927.   echo "$ac_t""no" 1>&6
  3928. fi
  3929. rm -f conftest*
  3930.  
  3931. echo $ac_n "checking "whether we can get save/1 to work"""... $ac_c" 1>&6
  3932. echo "configure:3933: checking "whether we can get save/1 to work"" >&5
  3933. echo '#include "confdefs.h"' > conftest.c
  3934. echo '#define CONFTEST 1' >> conftest.c
  3935. echo '#define TEST 1' >> conftest.c
  3936. cat $srcdir/pl-save.c >> conftest.c
  3937. ac_oldcflags="$CFLAGS"
  3938. CFLAGS="-I$srcdir $CFLAGS"
  3939. (eval $ac_link) 2>&5
  3940. CFLAGS="$ac_oldcflags"
  3941. if test -s conftest && ./conftest -s conftest.save >/dev/null && ./conftest.save > /dev/null; then
  3942.     cat >> confdefs.h <<\EOF
  3943. #define O_SAVE 1
  3944. EOF
  3945.  
  3946.     O_SAVE=yes
  3947.     echo "$ac_t""yes" 1>&6
  3948. else
  3949.     echo "$ac_t""no" 1>&6
  3950. fi
  3951. rm -fr conftest*
  3952.  
  3953. if test "$O_SAVE" = "yes"; then
  3954.  
  3955. case "$host" in
  3956.     *linux*)    STATICLIBS="/usr/lib/libc.a" ;;
  3957.     *sunos5*)    STATICLIBS="/usr/lib/libc.a -ldl" ;;
  3958.     *solaris2*)    STATICLIBS="/usr/lib/libc.a -ldl" ;;
  3959.     *sunos4*)    if test "$ac_cv_func_dlopen" = "yes"; then
  3960.            STATICLIBS="/usr/lib/libc.a"
  3961.         else
  3962.            LDFLAGS="$LDFLAGS -static"
  3963.         fi ;;
  3964.     *)
  3965.     for ac_prog in ldd
  3966. do
  3967. # Extract the first word of "$ac_prog", so it can be a program name with args.
  3968. set dummy $ac_prog; ac_word=$2
  3969. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3970. echo "configure:3971: checking for $ac_word" >&5
  3971. if eval "test \"`echo '$''{'ac_cv_prog_LDD'+set}'`\" = set"; then
  3972.   echo $ac_n "(cached) $ac_c" 1>&6
  3973. else
  3974.   if test -n "$LDD"; then
  3975.   ac_cv_prog_LDD="$LDD" # Let the user override the test.
  3976. else
  3977.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  3978.   for ac_dir in $PATH; do
  3979.     test -z "$ac_dir" && ac_dir=.
  3980.     if test -f $ac_dir/$ac_word; then
  3981.       ac_cv_prog_LDD="$ac_prog"
  3982.       break
  3983.     fi
  3984.   done
  3985.   IFS="$ac_save_ifs"
  3986. fi
  3987. fi
  3988. LDD="$ac_cv_prog_LDD"
  3989. if test -n "$LDD"; then
  3990.   echo "$ac_t""$LDD" 1>&6
  3991. else
  3992.   echo "$ac_t""no" 1>&6
  3993. fi
  3994.  
  3995. test -n "$LDD" && break
  3996. done
  3997. test -n "$LDD" || LDD=""none""
  3998.  
  3999.     if test "$LDD" = "ldd"; then
  4000.     ac_old_libs="$LIBS"
  4001.     ac_old_ldflags="$LDFLAGS"
  4002.     LDFLAGS="$LDFLAGS -static"
  4003.     echo $ac_n "checking "what kind of static linking is required"""... $ac_c" 1>&6
  4004. echo "configure:4005: checking "what kind of static linking is required"" >&5
  4005.  
  4006. cat > conftest.$ac_ext <<EOF
  4007. #line 4008 "configure"
  4008. #include "confdefs.h"
  4009.  
  4010. int main() {
  4011.  
  4012. #ifdef HAVE_DLOPEN
  4013.   dlopen();
  4014. #endif
  4015.  
  4016. ; return 0; }
  4017. EOF
  4018. if { (eval echo configure:4019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4019.   rm -rf conftest*
  4020.   ldstatic=yes
  4021. else
  4022.   echo "configure: failed program was:" >&5
  4023.   cat conftest.$ac_ext >&5
  4024. fi
  4025. rm -f conftest*
  4026.  
  4027.     if test "$ldstatic" != "yes"; then
  4028.         LDFLAGS="$ac_old_ldflags"
  4029.         STATICLIBS=/usr/lib/libc.a
  4030.         echo "$ac_t"""LDFLAGS=$LDFLAGS and STATICLIBS=$STATICLIBS"" 1>&6
  4031.         fi
  4032.         echo "$ac_t"""LDFLAGS=$LDFLAGS"" 1>&6
  4033.     fi ;;
  4034. esac
  4035. fi                    # O_SAVE's fi
  4036. fi                    # "$configsave" = "yes"
  4037.  
  4038. if test "$configloadforeign" = "yes"; then
  4039.  
  4040.  
  4041. echo $ac_n "checking "foreign C-interface"""... $ac_c" 1>&6
  4042. echo "configure:4043: checking "foreign C-interface"" >&5
  4043. cat > conftest.$ac_ext <<EOF
  4044. #line 4045 "configure"
  4045. #include "confdefs.h"
  4046.  
  4047. #include <stdio.h>
  4048. #include <sys/ldr.h>
  4049.  
  4050. int main() {
  4051.  char *buf[10];
  4052.   load("test", L_NOAUTODEFER, ".");
  4053.   loadquery(L_GETMESSAGES, &buf[2], sizeof(buf) - 8);
  4054.  
  4055. ; return 0; }
  4056. EOF
  4057. if { (eval echo configure:4058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4058.   rm -rf conftest*
  4059.   cat >> confdefs.h <<\EOF
  4060. #define O_AIX_FOREIGN 1
  4061. EOF
  4062.  
  4063.    echo "$ac_t"""AIX load based"" 1>&6
  4064.    ac_foreign=yes
  4065.    PLFOREIGN=aix_foreign.pl
  4066. else
  4067.   echo "configure: failed program was:" >&5
  4068.   cat conftest.$ac_ext >&5
  4069.   rm -rf conftest*
  4070.   PLFOREIGN=foreign.pl
  4071. fi
  4072. rm -f conftest*
  4073.  
  4074.  
  4075. if test "$ac_foreign" != "yes"; then
  4076. cat > conftest.$ac_ext <<EOF
  4077. #line 4078 "configure"
  4078. #include "confdefs.h"
  4079.  
  4080. #include <rld.h>
  4081.  
  4082. int main() {
  4083.  char *objfiles[10];
  4084.   struct mach_header *m_header;
  4085.   unsigned long rld_address;
  4086.  
  4087.   rld_load(stderr, &m_header, objfiles, NULL);
  4088.   rld_lookup(NULL, "_init", &rld_address);
  4089.  
  4090. ; return 0; }
  4091. EOF
  4092. if { (eval echo configure:4093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4093.   rm -rf conftest*
  4094.   cat >> confdefs.h <<\EOF
  4095. #define O_MACH_FOREIGN 1
  4096. EOF
  4097.  
  4098.    echo "$ac_t"""MACH rld_load based"" 1>&6
  4099.    ac_foreign=yes
  4100. else
  4101.   echo "configure: failed program was:" >&5
  4102.   cat conftest.$ac_ext >&5
  4103. fi
  4104. rm -f conftest*
  4105. fi
  4106.  
  4107.  
  4108. if test "$ac_foreign" != "yes"; then
  4109. echo "$ac_t"""no OS supported incremental linking"" 1>&6
  4110. echo $ac_n "checking "for ld -A"""... $ac_c" 1>&6
  4111. echo "configure:4112: checking "for ld -A"" >&5
  4112. cat > conftest.c <<EOF
  4113. int itf(){return 1;}
  4114. int main(int argc, char **argv){ return 0; }
  4115. EOF
  4116. if eval $ac_link && test -s conftest; then
  4117. cat > conftest-sub.c <<EOF
  4118. int init(){return itf();}
  4119. EOF
  4120. if ${CC-cc} -c conftest-sub.c; then
  4121. if ${CC-cc} -o conftest-sub -N -A conftest -T 10000 -lc 2>&5 && test -s conftest-sub 2>&5; then
  4122.     cat >> confdefs.h <<\EOF
  4123. #define HAVE_LD_A 1
  4124. EOF
  4125.  
  4126.     cat >> confdefs.h <<EOF
  4127. #define LD_COMMAND "$CC"
  4128. EOF
  4129.  
  4130.     echo "$ac_t""yes" 1>&6
  4131. rm -rf conftest*
  4132. echo $ac_n "checking "BSD a.out based loading"""... $ac_c" 1>&6
  4133. echo "configure:4134: checking "BSD a.out based loading"" >&5
  4134. cat > conftest.$ac_ext <<EOF
  4135. #line 4136 "configure"
  4136. #include "confdefs.h"
  4137.  
  4138. #include <stdio.h>
  4139. #include <sys/types.h>
  4140. #include <a.out.h>
  4141.  
  4142. int main() {
  4143.  
  4144.  
  4145. ; return 0; }
  4146. EOF
  4147. if { (eval echo configure:4148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4148.   rm -rf conftest*
  4149.   cat >> confdefs.h <<\EOF
  4150. #define O_FOREIGN 1
  4151. EOF
  4152.  
  4153.    echo "$ac_t""yes" 1>&6
  4154. else
  4155.   echo "configure: failed program was:" >&5
  4156.   cat conftest.$ac_ext >&5
  4157.   rm -rf conftest*
  4158.   echo "$ac_t""no" 1>&6
  4159. fi
  4160. rm -f conftest*
  4161. else
  4162.    echo "$ac_t""no" 1>&6
  4163. fi
  4164. fi
  4165. fi
  4166. fi
  4167. rm -rf conftest*
  4168. fi # configloadforeign
  4169.  
  4170. trap '' 1 2 15
  4171. cat > confcache <<\EOF
  4172. # This file is a shell script that caches the results of configure
  4173. # tests run on this system so they can be shared between configure
  4174. # scripts and configure runs.  It is not useful on other systems.
  4175. # If it contains results you don't want to keep, you may remove or edit it.
  4176. #
  4177. # By default, configure uses ./config.cache as the cache file,
  4178. # creating it if it does not exist already.  You can give configure
  4179. # the --cache-file=FILE option to use a different cache file; that is
  4180. # what configure does when it calls configure scripts in
  4181. # subdirectories, so they share the cache.
  4182. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  4183. # config.status only pays attention to the cache file if you give it the
  4184. # --recheck option to rerun configure.
  4185. #
  4186. EOF
  4187. # The following way of writing the cache mishandles newlines in values,
  4188. # but we know of no workaround that is simple, portable, and efficient.
  4189. # So, don't put newlines in cache variables' values.
  4190. # Ultrix sh set writes to stderr and can't be redirected directly,
  4191. # and sets the high bit in the cache file unless we assign to the vars.
  4192. (set) 2>&1 |
  4193.   case `(ac_space=' '; set) 2>&1` in
  4194.   *ac_space=\ *)
  4195.     # `set' does not quote correctly, so add quotes (double-quote substitution
  4196.     # turns \\\\ into \\, and sed turns \\ into \).
  4197.     sed -n \
  4198.       -e "s/'/'\\\\''/g" \
  4199.       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  4200.     ;;
  4201.   *)
  4202.     # `set' quotes correctly as required by POSIX, so do not add quotes.
  4203.     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  4204.     ;;
  4205.   esac >> confcache
  4206. if cmp -s $cache_file confcache; then
  4207.   :
  4208. else
  4209.   if test -w $cache_file; then
  4210.     echo "updating cache $cache_file"
  4211.     cat confcache > $cache_file
  4212.   else
  4213.     echo "not updating unwritable cache $cache_file"
  4214.   fi
  4215. fi
  4216. rm -f confcache
  4217.  
  4218. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  4219.  
  4220. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  4221. # Let make expand exec_prefix.
  4222. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  4223.  
  4224. # Any assignment to VPATH causes Sun make to only execute
  4225. # the first set of double-colon rules, so remove it if not needed.
  4226. # If there is a colon in the path, we need to keep it.
  4227. if test "x$srcdir" = x.; then
  4228.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  4229. fi
  4230.  
  4231. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  4232.  
  4233. DEFS=-DHAVE_CONFIG_H
  4234.  
  4235. # Without the "./", some shells look in PATH for config.status.
  4236. : ${CONFIG_STATUS=./config.status}
  4237.  
  4238. echo creating $CONFIG_STATUS
  4239. rm -f $CONFIG_STATUS
  4240. cat > $CONFIG_STATUS <<EOF
  4241. #! /bin/sh
  4242. # Generated automatically by configure.
  4243. # Run this file to recreate the current configuration.
  4244. # This directory was configured as follows,
  4245. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  4246. #
  4247. # $0 $ac_configure_args
  4248. #
  4249. # Compiler output produced by configure, useful for debugging
  4250. # configure, is in ./config.log if it exists.
  4251.  
  4252. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  4253. for ac_option
  4254. do
  4255.   case "\$ac_option" in
  4256.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  4257.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  4258.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  4259.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  4260.     echo "$CONFIG_STATUS generated by autoconf version 2.12"
  4261.     exit 0 ;;
  4262.   -help | --help | --hel | --he | --h)
  4263.     echo "\$ac_cs_usage"; exit 0 ;;
  4264.   *) echo "\$ac_cs_usage"; exit 1 ;;
  4265.   esac
  4266. done
  4267.  
  4268. ac_given_srcdir=$srcdir
  4269. ac_given_INSTALL="$INSTALL"
  4270.  
  4271. trap 'rm -fr `echo "Makefile README.bin pl.1 config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  4272. EOF
  4273. cat >> $CONFIG_STATUS <<EOF
  4274.  
  4275. # Protect against being on the right side of a sed subst in config.status.
  4276. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  4277.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  4278. $ac_vpsub
  4279. $extrasub
  4280. s%@CFLAGS@%$CFLAGS%g
  4281. s%@CPPFLAGS@%$CPPFLAGS%g
  4282. s%@CXXFLAGS@%$CXXFLAGS%g
  4283. s%@DEFS@%$DEFS%g
  4284. s%@LDFLAGS@%$LDFLAGS%g
  4285. s%@LIBS@%$LIBS%g
  4286. s%@exec_prefix@%$exec_prefix%g
  4287. s%@prefix@%$prefix%g
  4288. s%@program_transform_name@%$program_transform_name%g
  4289. s%@bindir@%$bindir%g
  4290. s%@sbindir@%$sbindir%g
  4291. s%@libexecdir@%$libexecdir%g
  4292. s%@datadir@%$datadir%g
  4293. s%@sysconfdir@%$sysconfdir%g
  4294. s%@sharedstatedir@%$sharedstatedir%g
  4295. s%@localstatedir@%$localstatedir%g
  4296. s%@libdir@%$libdir%g
  4297. s%@includedir@%$includedir%g
  4298. s%@oldincludedir@%$oldincludedir%g
  4299. s%@infodir@%$infodir%g
  4300. s%@mandir@%$mandir%g
  4301. s%@PLBASE@%$PLBASE%g
  4302. s%@STATICLIBS@%$STATICLIBS%g
  4303. s%@COFLAGS@%$COFLAGS%g
  4304. s%@CWFLAGS@%$CWFLAGS%g
  4305. s%@CMFLAGS@%$CMFLAGS%g
  4306. s%@CIFLAGS@%$CIFLAGS%g
  4307. s%@AR@%$AR%g
  4308. s%@ETAGS@%$ETAGS%g
  4309. s%@ARCH@%$ARCH%g
  4310. s%@PLFOREIGN@%$PLFOREIGN%g
  4311. s%@PL@%$PL%g
  4312. s%@RT@%$RT%g
  4313. s%@PLVERSION@%$PLVERSION%g
  4314. s%@VPATH@%$VPATH%g
  4315. s%@COUTOPT@%$COUTOPT%g
  4316. s%@INSTALLTARGET@%$INSTALLTARGET%g
  4317. s%@CC@%$CC%g
  4318. s%@RANLIB@%$RANLIB%g
  4319. s%@host@%$host%g
  4320. s%@host_alias@%$host_alias%g
  4321. s%@host_cpu@%$host_cpu%g
  4322. s%@host_vendor@%$host_vendor%g
  4323. s%@host_os@%$host_os%g
  4324. s%@MAKE@%$MAKE%g
  4325. s%@AWK@%$AWK%g
  4326. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  4327. s%@INSTALL_DATA@%$INSTALL_DATA%g
  4328. s%@CPP@%$CPP%g
  4329. s%@ALLOCA@%$ALLOCA%g
  4330. s%@LDD@%$LDD%g
  4331.  
  4332. CEOF
  4333. EOF
  4334.  
  4335. cat >> $CONFIG_STATUS <<\EOF
  4336.  
  4337. # Split the substitutions into bite-sized pieces for seds with
  4338. # small command number limits, like on Digital OSF/1 and HP-UX.
  4339. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  4340. ac_file=1 # Number of current file.
  4341. ac_beg=1 # First line for current file.
  4342. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  4343. ac_more_lines=:
  4344. ac_sed_cmds=""
  4345. while $ac_more_lines; do
  4346.   if test $ac_beg -gt 1; then
  4347.     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  4348.   else
  4349.     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  4350.   fi
  4351.   if test ! -s conftest.s$ac_file; then
  4352.     ac_more_lines=false
  4353.     rm -f conftest.s$ac_file
  4354.   else
  4355.     if test -z "$ac_sed_cmds"; then
  4356.       ac_sed_cmds="sed -f conftest.s$ac_file"
  4357.     else
  4358.       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  4359.     fi
  4360.     ac_file=`expr $ac_file + 1`
  4361.     ac_beg=$ac_end
  4362.     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  4363.   fi
  4364. done
  4365. if test -z "$ac_sed_cmds"; then
  4366.   ac_sed_cmds=cat
  4367. fi
  4368. EOF
  4369.  
  4370. cat >> $CONFIG_STATUS <<EOF
  4371.  
  4372. CONFIG_FILES=\${CONFIG_FILES-"Makefile README.bin pl.1"}
  4373. EOF
  4374. cat >> $CONFIG_STATUS <<\EOF
  4375. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  4376.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  4377.   case "$ac_file" in
  4378.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  4379.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  4380.   *) ac_file_in="${ac_file}.in" ;;
  4381.   esac
  4382.  
  4383.   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  4384.  
  4385.   # Remove last slash and all that follows it.  Not all systems have dirname.
  4386.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  4387.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  4388.     # The file is in a subdirectory.
  4389.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  4390.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  4391.     # A "../" for each directory in $ac_dir_suffix.
  4392.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  4393.   else
  4394.     ac_dir_suffix= ac_dots=
  4395.   fi
  4396.  
  4397.   case "$ac_given_srcdir" in
  4398.   .)  srcdir=.
  4399.       if test -z "$ac_dots"; then top_srcdir=.
  4400.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  4401.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  4402.   *) # Relative path.
  4403.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  4404.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  4405.   esac
  4406.  
  4407.   case "$ac_given_INSTALL" in
  4408.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  4409.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  4410.   esac
  4411.  
  4412.   echo creating "$ac_file"
  4413.   rm -f "$ac_file"
  4414.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  4415.   case "$ac_file" in
  4416.   *Makefile*) ac_comsub="1i\\
  4417. # $configure_input" ;;
  4418.   *) ac_comsub= ;;
  4419.   esac
  4420.  
  4421.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  4422.   sed -e "$ac_comsub
  4423. s%@configure_input@%$configure_input%g
  4424. s%@srcdir@%$srcdir%g
  4425. s%@top_srcdir@%$top_srcdir%g
  4426. s%@INSTALL@%$INSTALL%g
  4427. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  4428. fi; done
  4429. rm -f conftest.s*
  4430.  
  4431. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  4432. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  4433. #
  4434. # ac_d sets the value in "#define NAME VALUE" lines.
  4435. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  4436. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  4437. ac_dC='\3'
  4438. ac_dD='%g'
  4439. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  4440. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  4441. ac_uB='\([     ]\)%\1#\2define\3'
  4442. ac_uC=' '
  4443. ac_uD='\4%g'
  4444. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  4445. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  4446. ac_eB='$%\1#\2define\3'
  4447. ac_eC=' '
  4448. ac_eD='%g'
  4449.  
  4450. if test "${CONFIG_HEADERS+set}" != set; then
  4451. EOF
  4452. cat >> $CONFIG_STATUS <<EOF
  4453.   CONFIG_HEADERS="config.h"
  4454. EOF
  4455. cat >> $CONFIG_STATUS <<\EOF
  4456. fi
  4457. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  4458.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  4459.   case "$ac_file" in
  4460.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  4461.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  4462.   *) ac_file_in="${ac_file}.in" ;;
  4463.   esac
  4464.  
  4465.   echo creating $ac_file
  4466.  
  4467.   rm -f conftest.frag conftest.in conftest.out
  4468.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  4469.   cat $ac_file_inputs > conftest.in
  4470.  
  4471. EOF
  4472.  
  4473. # Transform confdefs.h into a sed script conftest.vals that substitutes
  4474. # the proper values into config.h.in to produce config.h.  And first:
  4475. # Protect against being on the right side of a sed subst in config.status.
  4476. # Protect against being in an unquoted here document in config.status.
  4477. rm -f conftest.vals
  4478. cat > conftest.hdr <<\EOF
  4479. s/[\\&%]/\\&/g
  4480. s%[\\$`]%\\&%g
  4481. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  4482. s%ac_d%ac_u%gp
  4483. s%ac_u%ac_e%gp
  4484. EOF
  4485. sed -n -f conftest.hdr confdefs.h > conftest.vals
  4486. rm -f conftest.hdr
  4487.  
  4488. # This sed command replaces #undef with comments.  This is necessary, for
  4489. # example, in the case of _POSIX_SOURCE, which is predefined and required
  4490. # on some systems where configure will not decide to define it.
  4491. cat >> conftest.vals <<\EOF
  4492. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  4493. EOF
  4494.  
  4495. # Break up conftest.vals because some shells have a limit on
  4496. # the size of here documents, and old seds have small limits too.
  4497.  
  4498. rm -f conftest.tail
  4499. while :
  4500. do
  4501.   ac_lines=`grep -c . conftest.vals`
  4502.   # grep -c gives empty output for an empty file on some AIX systems.
  4503.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  4504.   # Write a limited-size here document to conftest.frag.
  4505.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  4506.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  4507.   echo 'CEOF
  4508.   sed -f conftest.frag conftest.in > conftest.out
  4509.   rm -f conftest.in
  4510.   mv conftest.out conftest.in
  4511. ' >> $CONFIG_STATUS
  4512.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  4513.   rm -f conftest.vals
  4514.   mv conftest.tail conftest.vals
  4515. done
  4516. rm -f conftest.vals
  4517.  
  4518. cat >> $CONFIG_STATUS <<\EOF
  4519.   rm -f conftest.frag conftest.h
  4520.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  4521.   cat conftest.in >> conftest.h
  4522.   rm -f conftest.in
  4523.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  4524.     echo "$ac_file is unchanged"
  4525.     rm -f conftest.h
  4526.   else
  4527.     # Remove last slash and all that follows it.  Not all systems have dirname.
  4528.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  4529.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  4530.       # The file is in a subdirectory.
  4531.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  4532.     fi
  4533.     rm -f $ac_file
  4534.     mv conftest.h $ac_file
  4535.   fi
  4536. fi; done
  4537.  
  4538. EOF
  4539. cat >> $CONFIG_STATUS <<EOF
  4540.  
  4541. EOF
  4542. cat >> $CONFIG_STATUS <<\EOF
  4543.  
  4544. exit 0
  4545. EOF
  4546. chmod +x $CONFIG_STATUS
  4547. rm -fr confdefs* $ac_clean_files
  4548. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  4549.  
  4550.